MantisBT - CMake
View Issue Details
0009723CMakeModulespublic2009-10-16 16:292010-10-06 15:01
Ryan Pavlik 
David Cole 
normalmajoralways
closedfixed 
CMake-2-8 
CMake 2.8.3 
0009723: fixup_bundle in BundleUtilities.cmake doesn't properly copy openscenegraph frameworks.
I have tried this with CMake 2.6.4 and 2.8rc3 on Mac OS X 10.5 with XCode 3.1, using the latest CVS versions (see my other bug) of the FindOpenSceneGraph module. I am building an application that links against a few .dylib-style libraries, as well as OpenSceneGraph. I am using the framework version of OpenSceneGraph as provided on its web site. The application compiles correctly and produces a bundle, but inside "Contents" the Frameworks directory contains only the empty directory trees corresponding to the three OSG frameworks I am using, and not actually the binary file (library) of the frameworks (which the fixup_bundle script warns that don't exist in the bundle, but isn't actually copying them in correctly).

I have attached the CMake files for this application, as well as a copy of the bundle, a log of the terminal in an xcode build, and my cmakecache.

I think the bundle things I am doing are pretty simplistic (just a little bit beyond adding "MACOSX_BUNDLE" to the add_executable line, though it did take me quite a while to figure out exactly how to do it and I did have to work around slightly-buggy dylibs). If you need the whole source+build, I can do that, it just has some messy dependencies.
No tags attached.
related to 0010020closed David Cole BundleUtilities doesn't copy necessary parts of a framework 
zip cmake-bundle-utilities-bug.zip (1,894,618) 2009-10-16 16:29
https://public.kitware.com/Bug/file/2563/cmake-bundle-utilities-bug.zip
Issue History
2009-10-16 16:29Ryan PavlikNew Issue
2009-10-16 16:29Ryan PavlikFile Added: cmake-bundle-utilities-bug.zip
2009-10-16 16:35Ryan PavlikNote Added: 0018086
2009-10-16 17:05Bill HoffmanStatusnew => assigned
2009-10-16 17:05Bill HoffmanAssigned To => David Cole
2009-12-21 15:40David ColeNote Added: 0018966
2009-12-21 15:59David ColeNote Added: 0018968
2010-07-23 06:17David ColeRelationship addedrelated to 0010020
2010-07-27 14:09David ColeNote Added: 0021497
2010-08-29 01:40Kovarththanan RajaratnamCategoryCMakeSetup => Modules
2010-09-09 17:54David ColeNote Added: 0022172
2010-10-06 15:01David ColeNote Added: 0022423
2010-10-06 15:01David ColeStatusassigned => closed
2010-10-06 15:01David ColeResolutionopen => fixed
2010-10-06 15:01David ColeFixed in Version => CMake 2.8.3

Notes
(0018086)
Ryan Pavlik   
2009-10-16 16:35   
These are the frameworks I am using:
http://www.openscenegraph.org/downloads/stable_releases/OpenSceneGraph-2.2/binaries/OSX/ [^]
(0018966)
David Cole   
2009-12-21 15:40   
A source tree that I could use to reproduce this issue fully would really be helpful in determining what the cause / fix of this issue is...

Thanks if you can attach a full source tree or complete directions on how to build an app that depends on OpenSceneGraph frameworks.
(0018968)
David Cole   
2009-12-21 15:59   
One thing I noticed looking over your log output, though, is this:

-- fixup_bundle
-- app='/Users/ryan/Documents/XCode-Projects/wiimote-modelrot/build/src/Debug/wiimote-modelrot.app'
-- libs='libboost_filesystem-1_34_1.dylib;libboost_signals-1_34_1.dylib'
-- dirs='/Users/ryan/vrjuggler-2.2.1/lib'
-- fixup_bundle: preparing...
warning: target 'libboost_filesystem-1_34_1.dylib' is not absolute...
warning: target 'libboost_filesystem-1_34_1.dylib' does not exist...
/Developer/usr/bin/otool: can't open file: libboost_filesystem-1_34_1.dylib (No such file or directory)
warning: target 'libboost_signals-1_34_1.dylib' is not absolute...
warning: target 'libboost_signals-1_34_1.dylib' does not exist...
/Developer/usr/bin/otool: can't open file: libboost_signals-1_34_1.dylib (No such file or directory)
-- info: embedded item does not exist '/Users/ryan/Documents/XCode-Projects/wiimote-modelrot/build/src/Debug/wiimote-modelrot.app/Contents/Frameworks/osgUtil.framework/Versions/A/osgUtil'
-- warning: cannot resolve item '@executable_path/../Frameworks/osgUtil.framework/Versions/A/osgUtil'

Looks like you need more "dirs" as the 3rd arg to fixup_bundle... That should be a list of the places where you expect to find the 3rd-party dependencies that you are copying into the bundle. It finds the boost libs because they are in that directory... If your references to the OSG frameworks are not built into your build tree as full path references, then you'll need to include the directory to them as part of that 3rd arg as well. Maybe it's as simple as that.

But if not, attach more details, and I'll see what I can do after that....

Thanks,
David
(0021497)
David Cole   
2010-07-27 14:09   
If you checkout the CMake 'next' branch, does the fix for 0010020 also fix this issue?

Thanks for checking,
David
(0022172)
David Cole   
2010-09-09 17:54   
Ryan,

Can you confirm or deny that this bug is fixed with the current state of the CMake 'next' branch?

Thanks,
David
(0022423)
David Cole   
2010-10-06 15:01   
Theoretically fixed by same as fix for 0010020, but no confirmation from reporter. Closing after a month of waiting for a reply. Feel free to re-open the issue if there's still a problem...