mirror of
https://github.com/moparisthebest/curl
synced 2024-08-13 17:03:50 -04:00
CMake: CMake config files are defining CURL_STATICLIB for static builds
This change allows to use the CMake config files generated by Curl's CMake scripts for static builds of the library. The symbol CURL_STATIC lib must be defined to compile downstream, thus the config package is the perfect place to do so. Fixes #2817 Closes #2823 Reported-by: adnn on github Reviewed-by: Sergei Nikulov
This commit is contained in:
parent
39cb7130c3
commit
ab66a80488
@ -76,6 +76,10 @@ if(MSVC AND NOT BUILD_SHARED_LIBS)
|
|||||||
set_target_properties(${LIB_NAME} PROPERTIES STATIC_LIBRARY_FLAGS ${CMAKE_EXE_LINKER_FLAGS})
|
set_target_properties(${LIB_NAME} PROPERTIES STATIC_LIBRARY_FLAGS ${CMAKE_EXE_LINKER_FLAGS})
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
if(NOT BUILD_SHARED_LIBS)
|
||||||
|
set_target_properties(${LIB_NAME} PROPERTIES INTERFACE_COMPILE_DEFINITIONS CURL_STATICLIB)
|
||||||
|
endif()
|
||||||
|
|
||||||
target_link_libraries(${LIB_NAME} ${CURL_LIBS})
|
target_link_libraries(${LIB_NAME} ${CURL_LIBS})
|
||||||
|
|
||||||
if(WIN32)
|
if(WIN32)
|
||||||
|
Loading…
Reference in New Issue
Block a user