From 3c93e75b7e3772bbbba80bdcf82694d9ab0e7dc3 Mon Sep 17 00:00:00 2001 From: Nathan Moinvaziri Date: Tue, 1 Aug 2023 10:56:12 -0700 Subject: [PATCH] Don't add CURL::libcurl alias if it already exists. --- CMakeLists.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 65cd2ad..3f35ac1 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -245,7 +245,9 @@ if(PROXYRES_CURL AND (PROXYRES_EXECUTE OR PROXYRES_BUILD_CLI)) add_subdirectory(${curl_SOURCE_DIR} ${curl_BINARY_DIR} EXCLUDE_FROM_ALL) endif() - add_library(CURL::libcurl ALIAS libcurl) + if(NOT TARGET CURL::libcurl) + add_library(CURL::libcurl ALIAS libcurl) + endif() endif() endif()