[CMake] INTERFACE_LINK_LIBRARIES and CMP0028

Nils Gladitz nilsgladitz at gmail.com
Tue Sep 30 04:21:35 EDT 2014


On 09/30/2014 09:58 AM, Mueller-Roemer, Johannes Sebastian wrote:
> The behavior of the transitive INTERFACE_LINK_LIBRARIES combined with
> CMP0028 seems very broken to me. For libraries using a module (such as
> ZLIB), I can simply do a find_package in one of my libraries’
> CMakeLists.txt and link to it in a different CMakeLists.txt without
> issues. If I do the same with libraries using configs and IMPORTED
> targets (such as Qt5), I cannot have my find_package at the place of use
> but am forced to move it to the root CMakeLists.txt as I otherwise get
> CMP0028 warnings. Is this actually intended behavior? Am I doing
> something wrong? Shouldn’t INTERFACE_LINK_LIBRARIES just include the
> actual libraries (and INTERFACE_INCLUDE_DIRECTORIES the actual include
> directories) when linking to an imported target. These extra
> dependencies between CMakeLists.txt are very ugly :/

If I understand correctly then this was fixed here:
	http://www.cmake.org/gitweb?p=cmake.git;a=commitdiff;h=a272344228174958a8b2346793d3272eb432dad8

Which should be in 3.1 when it is released.

Nils


More information about the CMake mailing list