From b6aecd4a9838ee92d2ca104a9ad5781b8f41839d Mon Sep 17 00:00:00 2001 From: chemodax <53048645+chemodax@users.noreply.github.com> Date: Thu, 5 Dec 2024 17:52:12 +0100 Subject: [PATCH] cmake: set `CURL_STATICLIB` for static lib when `SHARE_LIB_OBJECT=OFF` When compiled with BUILD_STATIC_LIBS=ON and SHARE_LIB_OBJECT=OFF compile definition CURL_STATICLIB was not set for static library. It seems to be copy-paste error in the lib/CMakeLists.txt. This pull request fixes it. Closes #15695 --- lib/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt index 895bc9165a..aea8616b25 100644 --- a/lib/CMakeLists.txt +++ b/lib/CMakeLists.txt @@ -125,7 +125,7 @@ if(BUILD_STATIC_LIBS) add_library(${LIB_STATIC} STATIC ${LIB_SOURCE}) add_library(${PROJECT_NAME}::${LIB_STATIC} ALIAS ${LIB_STATIC}) if(WIN32) - set_property(TARGET ${LIB_OBJECT} APPEND PROPERTY COMPILE_DEFINITIONS "CURL_STATICLIB") + set_property(TARGET ${LIB_STATIC} APPEND PROPERTY COMPILE_DEFINITIONS "CURL_STATICLIB") endif() target_link_libraries(${LIB_STATIC} PRIVATE ${CURL_LIBS}) # Remove the "lib" prefix since the library is already named "libcurl". -- 2.47.3