[CMake] MACOSX_BUNDLE targets fail as custom target dependencies
Allan Odgaard
jovxhr102 at sneakemail.com
Sun May 25 15:02:41 EDT 2008
I have the following CMakeLists.txt file:
project(foo)
add_executable(foo MACOSX_BUNDLE main.cc)
add_custom_target(run_foo echo running foo DEPENDS foo)
This is what I get (Mac OS X Leopard, CMake 2.6.0 and 2.7 from CVS):
% make run_foo
Scanning dependencies of target foo
[100%] Building CXX object CMakeFiles/foo.dir/main.o
Linking CXX executable foo.app/Contents/MacOS/foo
[100%] Built target foo
Scanning dependencies of target run_foo
make[3]: *** No rule to make target `foo', needed by `CMakeFiles/
run_foo'. Stop.
make[2]: *** [CMakeFiles/run_foo.dir/all] Error 2
make[1]: *** [CMakeFiles/run_foo.dir/rule] Error 2
make: *** [run_foo] Error 2
Without the MACOSX_BUNDLE setting of the target, or trying to build
the same project on Linux, it works.
More information about the CMake
mailing list