include(CPack)
…
set(MACOSX_BUNDLE TRUE)
set(MACOSX_BUNDLE_BUNDLE_NAME targetB)
set(MACOSX_BUNDLE_ICON_FILE iconfile.icns)
set(MACOSX_BUNDLE_STARTUP_COMMAND targetB)
add_executable(targetA targetA.cc)
add_executable(targetB MACOSX_BUNDLE targetB.cc)
add_dependency(targetB targetA)
…
I have a C++ exe targetB on Mac OS X, and I am trying to get a previous dependent targetA (not a library, another executable) into it’s sources so that it will be put into the same bundle. If I leave out targetA from the sources in the add_executable command it doesn’t get in the bundle. However, if I leave it in it won’t build because cmake says the targetA doesn’t exist.
Any ideas?