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
This commit is contained in:
parent
ce949ba1dc
commit
b6aecd4a98
@ -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".
|
||||
|
||||
Loading…
Reference in New Issue
Block a user