Skip to content

Boost:boost target #19

Description

@MichaelUnknown

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions