Visual Studio and dependy on imported library

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

Visual Studio and dependy on imported library

Tim Kettler

imagine a project that declares an imported library (#implib#) in a
subdirectory. The imported library
depends on some other target (#lib#). A second imported library
(#implibtop#) with the same dependency is
declared in the top-level CMakeLists.txt. Additionally there are three
executables that each depend on one
of the library targets. An example project is available at Github [1].

With CMake 3.7.2 and Visual Studio 2015 I'm seeing the following project
dependencies in the solution:

- execlib (target_links #lib#) depends on the #lib# target
- execimplib (target_links #implib#) does not depend on the #lib# target
- execimplibtop (target_links #implibtop#) depends on the #lib# target

Is this the expected behaviour? Why is #execimplib# not picking up the

I discoverd this while creating a wrapper imported library for an
external project.




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: