Hi,
I use Boost via CMake FetchContent_declare (actually via CPM.cmake but it uses FetchContent internally). This works just fine, however I encountered a problem when I was using another dependency that was also depending on Boost itself. That dependency linked against Boost:boost (like target_link_libraries(Dependency INTERFACE Boost::boost)).
The Boost::boost target is provided by Boost if it is installed as a systems library. On my ubuntu 20.04 the file BoostConfig.cmake contains the following code:
# Compatibility targets
if(NOT TARGET Boost::boost)
add_library(Boost::boost INTERFACE IMPORTED)
set_property(TARGET Boost::boost APPEND PROPERTY INTERFACE_LINK_LIBRARIES Boost::headers)
<some more code>
endif()
However, with the new CMake integration, there is neither Boost::boost nor Boost::headers. Is there a plan to provide those targets with the new CMake integration? Or am I missing some configuration step for the targets to be available?
Hi,
I use Boost via CMake FetchContent_declare (actually via CPM.cmake but it uses FetchContent internally). This works just fine, however I encountered a problem when I was using another dependency that was also depending on Boost itself. That dependency linked against
Boost:boost(liketarget_link_libraries(Dependency INTERFACE Boost::boost)).The
Boost::boosttarget is provided by Boost if it is installed as a systems library. On my ubuntu 20.04 the fileBoostConfig.cmakecontains the following code:However, with the new CMake integration, there is neither
Boost::boostnorBoost::headers. Is there a plan to provide those targets with the new CMake integration? Or am I missing some configuration step for the targets to be available?