We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent bbcd179 commit bc7ea1fCopy full SHA for bc7ea1f
1 file changed
cmake/Boost_DD.cmake
@@ -30,9 +30,13 @@ else()
30
# (differ in linked targets).
31
# Also, FetchContent creates Boost::<lib> targets, whereas find_package does not. Since we cannot extend
32
# Boost::headers as it is an ALIAS target, this is the workaround:
33
+ get_target_property(ORIGINAL_TARGET Boost::headers ALIASED_TARGET)
34
+ if (ORIGINAL_TARGET STREQUAL "ORIGINAL_TARGET-NOTFOUND")
35
+ set(ORIGINAL_TARGET Boost::headers)
36
+ endif ()
37
foreach (lib ${REQUIRED_HEADER_LIBRARIES})
38
if (NOT TARGET Boost::${lib})
- add_library(Boost::${lib} ALIAS Boost::headers)
39
+ add_library(Boost::${lib} ALIAS ${ORIGINAL_TARGET})
40
endif ()
41
endforeach ()
42
endif()
0 commit comments