Hi,

If I have this CMakeLists.txt

cmake_minimum_required(VERSION 2.8)

add_library(foo SHARED foo.cpp)
add_library(foo2 SHARED foo2.cpp)

target_link_libraries(foo2 foo)

add_executable(app app.cpp)
target_link_libraries(app foo2)


It links app with both foo2 and foo.

But if I change to 
cmake_minimum_required(VERSION 2.8.12)

Then foo is dropped and the app links only with foo2, which gives me a link 
error.

Is that expected?  The docs for target_link_libraries() still says library 
dependencies are transitive by default.


-- 
Clinton Stimpson
Elemental Technologies, Inc
Computational Simulation Software, LLC
www.csimsoft.com
--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers

Reply via email to