Skip to content

Commit ecd0aef

Browse files
Feature#1129-CMake Error: ALIAS target "Boost::system" name collision when using vcpkg and FetchContent (#1133)
1 parent 6571a06 commit ecd0aef

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

CMakeLists.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,9 @@ if(CROW_USE_BOOST)
114114
if(Boost_VERSION VERSION_LESS 1.89)
115115
find_package(Boost 1.64 COMPONENTS system REQUIRED)
116116
else()
117-
add_library(Boost::system ALIAS Boost::headers)
117+
if(NOT TARGET Boost::system)
118+
add_library(Boost::system ALIAS Boost::headers)
119+
endif()
118120
endif()
119121
target_link_libraries(Crow
120122
INTERFACE

0 commit comments

Comments
 (0)