[CMake] BUILD_INTERFACE genex used even in install(EXPORT...
Mueller-Roemer, Johannes Sebastian
Johannes.Sebastian.Mueller-Roemer at igd.fraunhofer.de
Mon Nov 24 09:01:43 EST 2014
I am trying to add a library via it's variable(s) in an installed (static library) target, but BUILD_INTERFACE appears to be used for the generation of *-targets-*.cmake even when using install(EXPORT...), instead of INSTALL_INTERFACE:
CMakeLists.txt
[...]
target_link_libraries(${PROJECT_NAME} PUBLIC
$<$<CONFIG:Debug>:$<BUILD_INTERFACE:\${Boost_COROUTINE_LIBRARY_DEBUG}>> $<$<NOT:$<CONFIG:Debug>>:$<BUILD_INTERFACE:\${Boost_COROUTINE_LIBRARY_RELEASE}>>
)
[...]
install(EXPORT ${PROJECT_NAME}-targets DESTINATION share/cmake)
produces a file containing:
IMPORTED_LINK_INTERFACE_LIBRARIES_RELEASE "${Boost_COROUTINE_LIBRARY_RELEASE}"
Which seems wrong (and since I had to use the variable in BUILD_INTERFACE I can no longer use it from other projects within the same Build
--
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/20141124/bf0a1be2/attachment.html>
More information about the CMake
mailing list