Removed -DCURL_STATIC on OSX,

added dynamic linking of OpenSSL on Linux, even if libcurl is linked
statically.
This commit is contained in:
bubnikv 2018-03-02 21:16:00 +01:00 committed by Vojtech Kral
parent f67d70941e
commit b897209e0d

View File

@ -528,6 +528,15 @@ find_package(CURL REQUIRED)
include_directories(${CURL_INCLUDE_DIRS})
target_link_libraries(XS ${CURL_LIBRARIES})
if (SLIC3R_STATIC AND CMAKE_SYSTEM_NAME STREQUAL "Linux")
# As of now, our build system produces a statically linked libcurl,
# which links the OpenSSL library dynamically.
find_package(OpenSSL REQUIRED)
message("OpenSSL include dir: ${OPENSSL_INCLUDE_DIR}")
message("OpenSSL libraries: ${OPENSSL_LIBRARIES}")
include_directories(${OPENSSL_INCLUDE_DIR})
target_link_libraries(XS ${OPENSSL_LIBRARIES})
endif()
## OPTIONAL packages