[CMake] Dependent Libraries added automatically?

Bill Hoffman bill.hoffman at kitware.com
Fri Sep 26 15:59:40 EDT 2008


Michael Jackson wrote:

>>
>> add_library(a ...)
>> target_link_library(a b c)
>>
>> add_executable(foo ...)
>> target_link_libraries(foo a)
>>
>> This will cause foo to link to a b c.
>>
>> With CMake 2.6.2 you can stop this from happening with a target property:
>>
>> http://www.cmake.org/cmake/help/cmake2.6docs.html#prop_tgt:LINK_INTERFACE_LIBRARIES 
>>
>>
>> -Bill
> 
> And just to be clear this will work on all platforms, all compilers?
> 
Yes, it should.

-Bill


More information about the CMake mailing list