[CMake] Question about BundleUtilities

Marco Nolden m.nolden at dkfz-heidelberg.de
Tue Oct 19 10:34:46 EDT 2010


Dear all,

we have some problems using the BundleUtilities macro for deployment on 
Mac OS X. I created a very small test project which is similar to our setup:

http://github.com/nolden/bundle-test

- libA is a plugin that would be loaded at runtime by means of dlopen 
(or something similar). We added an explicit INSTALL(TARGETS libA) for 
this library.

- libB is a dependency of libA

- Main is an indepedent main application that would in practice load 
libA with dlopen (not in the example)

Calling fixup_bundle with libA as a plugin gives some errors on Mac OS, 
because libB is not copied to the install tree:

Install the project...
-- Install configuration: ""
-- Installing: /Users/engelm/bundle-test/install/lib/liblibA.dylib
-- Installing: /Users/engelm/bundle-test/install/bin/Main
GetPreReq
-- fixup_bundle
--   app='/Users/engelm/bundle-test/install/bin/Main'
--   libs='/Users/engelm/bundle-test/install/lib/liblibA.dylib'
--   dirs='/Users/engelm/bundle-test/bin/bin'
-- fixup_bundle: preparing...
-- warning: embedded item does not exist 
'/Users/engelm/bundle-test/install/MacOS/liblibB.dylib'
--
******************************************************************************
warning: cannot resolve item '@executable_path/../MacOS/liblibB.dylib'

On Linux, the copying of the dependencies works, we have not tested 
windows yet.

Is this the intended use of the BundleUtilities script? It looks like a 
very good solution for cross-platform deployment.

Best,

Marco / Sascha

MITK, http://www.mitk.org



More information about the CMake mailing list