[CMake] Executable and library dependencies
Emmanuel Blot
eblotml at free.fr
Tue May 5 15:52:14 EDT 2009
> Ideally you wouldn't use linker flags, but just use the target you've
> created via add_library. But I guess that doesn't work with the
> start-group
> stuff. So...
Yeah, at least I've been unable to find a better way to use --start-
group / --end-group
>> There is no explicit dependencies between myapp and mylib, which I
>> guess explain why CMake allows myapp to be built before mylib is
>> built.
>>
>> What would be the best way to add a dependency to solve this issue?
>> In other word, I'll go for ADD_DEPENDENCY(myapp x), but I'm not
>> sure how to define 'x' here.
>
> This would be the right way and "x" should simply be "mylib" in your
> example, which creates a dependency between the myapp target and the
> mylib
> target in your project.
Works fine, thanks !
Cheers,
Manu
More information about the CMake
mailing list