[CMake] INTERFACE_LINK_LIBRARIES and CMP0028

Mueller-Roemer, Johannes Sebastian Johannes.Sebastian.Mueller-Roemer at igd.fraunhofer.de
Tue Sep 30 03:58:04 EDT 2014


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 :/

--
Johannes S. Mueller-Roemer, MSc
Wiss. Mitarbeiter - Interactive Engineering Technologies (IET)

Fraunhofer-Institut für Graphische Datenverarbeitung IGD
Fraunhoferstr. 5  |  64283 Darmstadt  |  Germany
Tel +49 6151 155-606  |  Fax +49 6151 155-139
johannes.mueller-roemer at igd.fraunhofer.de  |  www.igd.fraunhofer.de

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/cmake/attachments/20140930/2918e746/attachment.html>


More information about the CMake mailing list