Actually, I'm using this to make a static library that uses boost useable via find_package without having hard-coded paths inside it and my Config.cmake contains a find_package(Boost 1.56 EXACT REQUIRED COMPONENTS coroutine context system). So it isn't exactly only academic... Yes, it would be simpler if Boost already provided IMPORTED targets, but expecting IMPORTED targets for every library out there is not realistic, so another, ideally less verbose, solution would be incredibly useful.
-- 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-roe...@igd.fraunhofer.de | www.igd.fraunhofer.de -----Original Message----- From: CMake [mailto:cmake-boun...@cmake.org] On Behalf Of Stephen Kelly Sent: Tuesday, November 25, 2014 16:14 To: cmake@cmake.org Subject: Re: [CMake] BUILD_INTERFACE genex used even in install(EXPORT... Mueller-Roemer, Johannes Sebastian wrote: > For clarification: > > As an imported target can't have debug and optimized keywords, I can't > simply use $<BUILD_INTERFACE:${Boost_LIBRARIES}> > $<INSTALL_INTERFACE:\${Boost_LIBRARIES}> But have to do > $<BUILD_INTERFACE: > $<$<CONFIG:Debug>: > ... Yes, but for the user of the target, it's just target_link_libraries(mytgt Boost::Coroutine) This is academic though anyway until someone decides to submit and maintain IMPORTED targets for Boost, or until Boost decides to make them available itself. So, for now, you are correct, it's verbose. Thanks, Steve. -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake