You may want to take a look at the Qt Demo application linked from the Wiki.

http://www.cmake.org/Wiki/BundleUtilitiesExample

___________________________________________________________
Mike Jackson                      www.bluequartz.net
Principal Software Engineer       mike.jack...@bluequartz.net 
BlueQuartz Software               Dayton, Ohio

On Aug 31, 2011, at 10:06 AM, Yifei Li wrote:

> Mike,
> 
> I don't have macosx_ bundle in add_executable().
> 
> My app also depends on other libraries besides openmesh such as Qt, and 
> "otool -L MeshVisualization" shows that :
> /usr/local/Trolltech/Qt-4.8.0/lib/QtOpenGL.framework/Versions/4/QtOpenGL 
> (compatibility version 4.8.0, current version 4.8.0)
>       /usr/local/Trolltech/Qt-4.8.0/lib/QtGui.framework/Versions/4/QtGui 
> (compatibility version 4.8.0, current version 4.8.0)
>       /usr/local/Trolltech/Qt-4.8.0/lib/QtCore.framework/Versions/4/QtCore 
> (compatibility version 4.8.0, current version 4.8.0)
>       @executable_path/../Libraries/libOpenMeshCore.2.0.dylib (compatibility 
> version 2.0.0, current version 2.0.0)
>       /opt/local/lib/libGLEW.1.5.1.dylib (compatibility version 0.0.0, 
> current version 0.0.0)
>       /System/Library/Frameworks/AGL.framework/Versions/A/AGL (compatibility 
> version 1.0.0, current version 1.0.0)
>       /System/Library/Frameworks/OpenGL.framework/Versions/A/OpenGL 
> (compatibility version 1.0.0, current version 1.0.0)
>       /usr/local/qwt/lib/libqwt.5.dylib (compatibility version 5.2.0, current 
> version 5.2.1)
>       
> /Users/yifli/Documents/MeshVisualization/build/Build/lib/Debug/../MeshVisLib.dylib
>  (compatibility version 0.0.0, current version 0.0.0)
>       /usr/lib/libstdc++.6.dylib (compatibility version 7.0.0, current 
> version 52.0.0)
>       /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current 
> version 159.0.0)
> 
> Yifei
> 
> 
> On Aug 31, 2011, at 9:52 AM, Michael Jackson wrote:
> 
>> You need to copy the library into the .app bundle at 
>> MeshVisualization.app/Contents/Libraries/.
>> 
>> Your "add_executable()" command should have the "MACOSX_BUNDLE" set in. See 
>> the help listing for the add executable.
>> ___________________________________________________________
>> Mike Jackson                      www.bluequartz.net
>> Principal Software Engineer       mike.jack...@bluequartz.net 
>> BlueQuartz Software               Dayton, Ohio
>> 
>> On Aug 31, 2011, at 9:04 AM, Yifei Li wrote:
>> 
>>> Hi all,
>>> 
>>> My app MeshVisualization uses a library called OpenMesh. I had a runtime 
>>> error when running the app: 
>>> dyld: Library not loaded: 
>>> @executable_path/../Libraries/libOpenMeshCore.2.0.dylib
>>> Referenced from: 
>>> /Users/yifli/Documents/MeshVisualization/build/Build/bin/MeshVisualization
>>> Reason: image not found
>>> 
>>> 
>>> My FindOpenMesh.cmake does find the library and defines 
>>> OPENMESH_LIBRARY:  OpenMeshCore
>>> OPENMESH_LIBRARY_DIR: /usr/local/lib/OpenMesh
>>> 
>>> However, I noticed from compiling details:
>>> ld: warning: directory not found for option 
>>> '-L/usr/local/lib/OpenMesh/Debug'
>>> 
>>> So how should I solve the runtime problem? Thanks
>>> 
>>> 
>>> Yifei
>>> 
>>> _______________________________________________
>>> Powered by www.kitware.com
>>> 
>>> Visit other Kitware open-source projects at 
>>> http://www.kitware.com/opensource/opensource.html
>>> 
>>> Please keep messages on-topic and check the CMake FAQ at: 
>>> http://www.cmake.org/Wiki/CMake_FAQ
>>> 
>>> Follow this link to subscribe/unsubscribe:
>>> http://www.cmake.org/mailman/listinfo/cmake
>> 
>> _______________________________________________
>> Powered by www.kitware.com
>> 
>> Visit other Kitware open-source projects at 
>> http://www.kitware.com/opensource/opensource.html
>> 
>> Please keep messages on-topic and check the CMake FAQ at: 
>> http://www.cmake.org/Wiki/CMake_FAQ
>> 
>> Follow this link to subscribe/unsubscribe:
>> http://www.cmake.org/mailman/listinfo/cmake
> 

_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

Reply via email to