[CMake] static library from several subdirectories

Verweij, Arjen VerweijA at tass-safe.com
Wed Mar 17 10:45:55 EDT 2010


Hi,

>-----Original Message-----
>From: Michael Wild [mailto:themiwi at gmail.com]


>I think the problem is that the ${BIG_LIB} target does not exist when
>you call ADD_DEPENDENCIES. Probably you should also collect all the
>custom targets into a global property and then after the
>ADD_LIBRARY(${BIG_LIB} ...) do the ADD_DEPENDENCIES call.

Woops. Indeed so, before the dependency was added after add_library() was called to create a target for the ${CMAKE_CURRENT_BINARY_DIR} -- add_library() has now made way for add_sources(). I think I will assemble these dependencies globally as well. Thanks again.

>PS: Sorry about my last message which was a bit messy (missing
>dependency stuff, wrong output name etc). My only apology is that it was
>still early in the morning ;-)

Agreed, it was so early, you probably didn't even had coffee yet ;) Still, it's much appreciated, no need to apologise at all.

Regards,
Arjen


More information about the CMake mailing list