Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion cmake/Boost_DD.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,13 @@ else()
# (differ in linked targets).
# Also, FetchContent creates Boost::<lib> targets, whereas find_package does not. Since we cannot extend
# Boost::headers as it is an ALIAS target, this is the workaround:
get_target_property(ORIGINAL_TARGET Boost::headers ALIASED_TARGET)
if (ORIGINAL_TARGET STREQUAL "ORIGINAL_TARGET-NOTFOUND")
set(ORIGINAL_TARGET Boost::headers)
endif ()
foreach (lib ${REQUIRED_HEADER_LIBRARIES})
if (NOT TARGET Boost::${lib})
add_library(Boost::${lib} ALIAS Boost::headers)
add_library(Boost::${lib} ALIAS ${ORIGINAL_TARGET})
endif ()
endforeach ()
endif()