[CMake] External projects and targets
Francisco Requena Espí
frarees at gmail.com
Wed Jan 18 12:52:57 EST 2012
Hi,
I'm currently porting a project into CMake under OSX.
Here's how it should work:
PROJECT
- DEPENDENCY 1 (1 target)
-- DEPENDENCY 2 (3 targets)
-- DEPENDENCY 3 (2 targets)
-- DEPENDENCY 4 (8 targets)
- DEPENDENCY 5 (1 target)
...
So, dependency 1 depends on dependencies 2, 3 and 4. Project depends
on dependency 1 and 5. They are all CMake standalone projects.
I'm using ExternalProject_Add to build everything. But, if I do:
ExternalProject_Add(DEP_2 ...)
I lose every target (that means, I get a DEP_2 target instead of
DEP_2_TARGET_1, DEP_2_TARGET_3, DEP_2_TARGET_3), so I also lose every
defined build setting, specific of each target. That leads to
compiling errors (specific target flags are not set I think).
I've tried this on Xcode, I don't know about Visual Studio or other tools.
NOTE: Every individual project (leaf dependencies) builds standalone
without problem.
How should I do that?
Thanks!
More information about the CMake
mailing list