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.
You shouldn’t need the add_dependencies, but it probably doesn’t hurt too much either. You probably need a install(TARGETS targetA) with the appropriate destination. You’ll want it to come after the install for targetB though so that the directory structure exists.
If I may jump in here for a sec. This is very similar to my question here. So, what you are suggesting is to build one of the executables as MACOSX_BUNDLE and install the second on in the Contents/MacOS folder next to it, right?