Skip to content

Commit

Permalink
OMG FFS
Browse files Browse the repository at this point in the history
  • Loading branch information
FrogTheFrog authored Dec 17, 2024
1 parent 90cde79 commit 603c4b8
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions cmake/Boost_DD.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +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_headers_target Boost::headers ALIASED_TARGET)
get_target_property(ORIGINAL_TARGET Boost::headers ALIASED_TARGET)
if (NOT DEFINED ORIGINAL_TARGET-NOTFOUND)
set(ORIGINAL_TARGET Boost::headers)
endif ()
foreach (lib ${REQUIRED_HEADER_LIBRARIES})
if (NOT TARGET Boost::${lib})
add_library(Boost::${lib} ALIAS ${original_headers_target})
add_library(Boost::${lib} ALIAS ${ORIGINAL_TARGET})
endif ()
endforeach ()
endif()

0 comments on commit 603c4b8

Please sign in to comment.