[CMake] Visual Studio and dependy on imported library
Tim Kettler
tim.kettler at udo.edu
Mon Jan 23 04:02:48 EST 2017
Hi,
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
dependency?
I discoverd this while creating a wrapper imported library for an
external project.
-Tim
[1] https://github.com/tik/cmake-implib
More information about the CMake
mailing list