[cmake-developers] OSX - Application bundle and private frameworks?

Raffi Enficiaud raffi.enficiaud at mines-paris.org
Mon Jul 13 18:43:19 EDT 2015


Hi,

I am trying to copy a private framework into an application bundle:

- I can find the frameworks properly with the "find_library",
- I put those frameworks in the add_executable command

add_executable(
     xxxx
     MACOSX_BUNDLE

     ### source files ...
     ### frameworks
     ${sbigudFramework}
     ${fcCamFramework}
)

target_link_libraries(xxxx [...] ${sbigudFramework} ${fcCamFramework})

- and I specify the location of those frameworks within the application 
bundle:

set_source_files_properties(${fcCamFramework}  PROPERTIES 
MACOSX_PACKAGE_LOCATION Frameworks)
set_source_files_properties(${sbigudFramework} PROPERTIES 
MACOSX_PACKAGE_LOCATION Frameworks)



The problem is the following:
- Everything works fine with XCode, I have the full content of the 
frameworks at the specified location
- When I use the Makefile generator, I have only one file per framework 
instead of the directory and the framework content:

 > ls -al xxxx.app/Contents/Frameworks/
total 0
drwxr-xr-x  4 raffi  staff  136 Jul 14 00:26 .
drwxr-xr-x  6 raffi  staff  204 Jul 14 00:08 ..
-rwxr-xr-x  1 raffi  staff    0 Jul 14 00:26 SBIGUDrv.framework
-rwxr-xr-x  1 raffi  staff    0 Jul 14 00:26 fcCamFw.framework

Am I doing something wrong? I am using cmake 3.0.2 & 3.2.3 / OSX 10.10.

Best,
Raffi



More information about the cmake-developers mailing list