Revamp CURL integration. Exclude it from APPLE
This commit is contained in:
parent
15a082b80b
commit
3a7cdeeae4
5 changed files with 32 additions and 29 deletions
9
deps/CMakeLists.txt
vendored
9
deps/CMakeLists.txt
vendored
|
@ -179,7 +179,12 @@ include(CGAL/CGAL.cmake)
|
|||
include(NLopt/NLopt.cmake)
|
||||
|
||||
include(OpenSSL/OpenSSL.cmake)
|
||||
include(CURL/CURL.cmake)
|
||||
|
||||
set(CURL_PKG "")
|
||||
if (NOT CURL_FOUND)
|
||||
include(CURL/CURL.cmake)
|
||||
set(CURL_PKG dep_CURL)
|
||||
endif ()
|
||||
|
||||
include(JPEG/JPEG.cmake)
|
||||
include(TIFF/TIFF.cmake)
|
||||
|
@ -188,7 +193,7 @@ include(wxWidgets/wxWidgets.cmake)
|
|||
set(_dep_list
|
||||
dep_Boost
|
||||
dep_TBB
|
||||
dep_CURL
|
||||
${CURL_PKG}
|
||||
dep_wxWidgets
|
||||
dep_Cereal
|
||||
dep_NLopt
|
||||
|
|
14
deps/CURL/CURL.cmake
vendored
14
deps/CURL/CURL.cmake
vendored
|
@ -48,11 +48,13 @@ elseif(CMAKE_SYSTEM_NAME STREQUAL "Linux")
|
|||
)
|
||||
endif ()
|
||||
|
||||
if (BUILD_SHARED_LIBS)
|
||||
set(_curl_static OFF)
|
||||
else()
|
||||
set(_curl_static ON)
|
||||
endif()
|
||||
set(_patch_command "")
|
||||
if (UNIX AND NOT APPLE)
|
||||
# On non-apple UNIX platforms, finding the location of OpenSSL certificates is necessary at runtime, as there is no standard location usable across platforms.
|
||||
# The OPENSSL_CERT_OVERRIDE flag is understood by PrusaSlicer and will trigger the search of certificates at initial application launch.
|
||||
# Then ask the user for consent about the correctness of the found location.
|
||||
set (_patch_command echo set_target_properties(CURL::libcurl PROPERTIES INTERFACE_COMPILE_DEFINITIONS OPENSSL_CERT_OVERRIDE) >> CMake/curl-config.cmake.in)
|
||||
endif ()
|
||||
|
||||
prusaslicer_add_cmake_project(CURL
|
||||
# GIT_REPOSITORY https://github.com/curl/curl.git
|
||||
|
@ -62,10 +64,10 @@ prusaslicer_add_cmake_project(CURL
|
|||
DEPENDS ${ZLIB_PKG}
|
||||
# PATCH_COMMAND ${GIT_EXECUTABLE} checkout -f -- . && git clean -df &&
|
||||
# ${GIT_EXECUTABLE} apply --whitespace=fix ${CMAKE_CURRENT_LIST_DIR}/curl-mods.patch
|
||||
PATCH_COMMAND "${_patch_command}"
|
||||
CMAKE_ARGS
|
||||
-DBUILD_TESTING:BOOL=OFF
|
||||
-DCMAKE_POSITION_INDEPENDENT_CODE=ON
|
||||
-DCURL_STATICLIB=${_curl_static}
|
||||
${_curl_platform_flags}
|
||||
)
|
||||
|
||||
|
|
5
deps/deps-macos.cmake
vendored
5
deps/deps-macos.cmake
vendored
|
@ -15,6 +15,11 @@ set(DEP_CMAKE_OPTS
|
|||
|
||||
include("deps-unix-common.cmake")
|
||||
|
||||
find_package(CURL QUIET)
|
||||
if (NOT CURL_FOUND)
|
||||
message(WARNING "No CURL dev package found in system, building static library. Mac SDK should include CURL from at least version 10.12. Check your SDK installation.")
|
||||
endif ()
|
||||
|
||||
|
||||
# ExternalProject_Add(dep_boost
|
||||
# EXCLUDE_FROM_ALL 1
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue