From f99a4c759f521614b07c58468503cda81751470d Mon Sep 17 00:00:00 2001 From: Don Date: Wed, 17 Nov 2021 13:21:28 -0800 Subject: [PATCH] cmake: don't set _USRDLL on a static Windows build Closes #8030 --- lib/CMakeLists.txt | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt index 2575288f70..46973bf2b8 100644 --- a/lib/CMakeLists.txt +++ b/lib/CMakeLists.txt @@ -95,10 +95,6 @@ endif() target_link_libraries(${LIB_NAME} ${CURL_LIBS}) -if(WIN32) - add_definitions(-D_USRDLL) -endif() - set_target_properties(${LIB_NAME} PROPERTIES COMPILE_DEFINITIONS BUILDING_LIBCURL OUTPUT_NAME ${LIBCURL_OUTPUT_NAME} @@ -121,6 +117,7 @@ endif() if(WIN32) if(BUILD_SHARED_LIBS) + set_property(TARGET ${LIB_NAME} APPEND PROPERTY COMPILE_DEFINITIONS "_USRDLL") if(MSVC) # Add "_imp" as a suffix before the extension to avoid conflicting with # the statically linked "libcurl.lib" -- 2.47.3