diff options
author | bubnikv <bubnikv@gmail.com> | 2018-03-06 13:39:24 +0300 |
---|---|---|
committer | bubnikv <bubnikv@gmail.com> | 2018-03-06 13:39:24 +0300 |
commit | e26ccfc2479ad373ab86d4c54d11c8e2194d19d8 (patch) | |
tree | 9a4faaac0585b37f97b1bfa15749f7038571bf35 /xs | |
parent | ca0f6131a18ea7fa089fb4eea979c9b3f87703a0 (diff) |
Fixed compilation on Windows,
removed debugging menu and debugging output.
Diffstat (limited to 'xs')
-rw-r--r-- | xs/CMakeLists.txt | 23 |
1 files changed, 15 insertions, 8 deletions
diff --git a/xs/CMakeLists.txt b/xs/CMakeLists.txt index d8ef51caa..5f5771147 100644 --- a/xs/CMakeLists.txt +++ b/xs/CMakeLists.txt @@ -533,14 +533,21 @@ 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}) +if (SLIC3R_STATIC) + if (NOT APPLE) + # libcurl is always linked dynamically to the system libcurl on OSX. + # On other systems, libcurl is linked statically if SLIC3R_STATIC is set. + add_definitions(-DCURL_STATICLIB) + endif() + if (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() endif() ## OPTIONAL packages |