From 78e396b2b7b5d2b336768c7575ed9b6ec423fc59 Mon Sep 17 00:00:00 2001 From: Emmanuel Bachlitzanakis <115871174+EmBachlitzanakis@users.noreply.github.com> Date: Wed, 14 Jan 2026 14:01:57 +0200 Subject: [PATCH] Feature#1129-CMake Error: ALIAS target "Boost::system" name collision when using vcpkg and FetchContent --- CMakeLists.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 48693423a2..7b58e36073 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -103,7 +103,9 @@ if(CROW_USE_BOOST) if(Boost_VERSION VERSION_LESS 1.89) find_package(Boost 1.64 COMPONENTS system REQUIRED) else() - add_library(Boost::system ALIAS Boost::headers) + if(NOT TARGET Boost::system) + add_library(Boost::system ALIAS Boost::headers) + endif() endif() target_link_libraries(Crow INTERFACE