diff options
author | Don <don.j.olmstead@gmail.com> | 2021-11-17 13:21:28 -0800 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2021-11-18 11:26:30 +0100 |
commit | f99a4c759f521614b07c58468503cda81751470d (patch) | |
tree | 6140c8f06cdb1622e42ad3a388274fadc3b281e2 | |
parent | fa5c311904b21350f2d1ed903ee3b249ef945470 (diff) | |
download | curl-f99a4c759f521614b07c58468503cda81751470d.tar.gz |
cmake: don't set _USRDLL on a static Windows build
Closes #8030
-rw-r--r-- | lib/CMakeLists.txt | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt index 2575288f7..46973bf2b 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" |