dependency on external libraries (and Visual Studio)

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

dependency on external libraries (and Visual Studio)

Kris Thielemans-2



I have a project with a shared library that depends on some external static libraries. Those are CMake imported targets. It appears that my shared library does not get rebuild when the external libraries are updated. (It would need to be relinked). Is this expected?


A bit more info on my set-up:

CMake 3.8.0

Visual Studio Community 2015


Some content of my CMakeLists.txt (the external libraries are set in $(STIR_LIBRARIES}). Full project is on


# static library depending on external

add_library(cstir cstir_p.cpp)

target_link_libraries(cstir ${STIR_LIBRARIES})


# shared library depending on external (probably not necessary as depends on cstir already)

add_library(mstir SHARED mstir.c)

target_link_libraries(mstir  cstir ${STIR_LIBRARIES})


When checking the Visual Studio project, mstir has a “Reference” to cstir, but neither of them refers to any of the externals.





Powered by

Please keep messages on-topic and check the CMake FAQ at:

Kitware offers various services to support the CMake community. For more information on each offering, please visit:

CMake Support:
CMake Consulting:
CMake Training Courses:

Visit other Kitware open-source projects at

Follow this link to subscribe/unsubscribe: