cmake: don't set _USRDLL on a static Windows build

Closes #8030
This commit is contained in:
Don 2021-11-17 13:21:28 -08:00 committed by Daniel Stenberg
parent fa5c311904
commit f99a4c759f
No known key found for this signature in database
GPG Key ID: 5CC908FDB71E12C2

View File

@ -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"