2021-03-20 15:16:50 +00:00
set ( _curl_platform_flags
- D E N A B L E _ I P V 6 : B O O L = O N
- D E N A B L E _ V E R S I O N E D _ S Y M B O L S : B O O L = O N
- D E N A B L E _ T H R E A D E D _ R E S O L V E R : B O O L = O N
2021-03-23 17:47:22 +00:00
# -DCURL_DISABLE_LDAP:BOOL=ON
# -DCURL_DISABLE_LDAPS:BOOL=ON
2021-03-20 15:16:50 +00:00
- D E N A B L E _ M A N U A L : B O O L = O F F
2021-03-23 17:47:22 +00:00
# -DCURL_DISABLE_RTSP:BOOL=ON
# -DCURL_DISABLE_DICT:BOOL=ON
# -DCURL_DISABLE_TELNET:BOOL=ON
# -DCURL_DISABLE_POP3:BOOL=ON
# -DCURL_DISABLE_IMAP:BOOL=ON
# -DCURL_DISABLE_SMB:BOOL=ON
# -DCURL_DISABLE_SMTP:BOOL=ON
# -DCURL_DISABLE_GOPHER:BOOL=ON
- D H T T P _ O N L Y = O N
2021-03-20 15:16:50 +00:00
- D C M A K E _ U S E _ G S S A P I : B O O L = O F F
- D C M A K E _ U S E _ L I B S S H 2 : B O O L = O F F
- D U S E _ R T M P : B O O L = O F F
- D U S E _ N G H T T P 2 : B O O L = O F F
- D U S E _ M B E D T L S : B O O L = O F F
)
2021-03-23 17:47:22 +00:00
if ( WIN32 )
set ( _curl_platform_flags ${ _curl_platform_flags } -DCMAKE_USE_SCHANNEL=ON )
elseif ( APPLE )
2021-03-20 15:16:50 +00:00
set ( _curl_platform_flags
$ { _ c u r l _ p l a t f o r m _ f l a g s }
2021-03-24 09:24:56 +00:00
- D C M A K E _ U S E _ S E C T R A N S P : B O O L = O N
2021-03-20 15:16:50 +00:00
- D C M A K E _ U S E _ O P E N S S L : B O O L = O F F
- D C U R L _ C A _ P A T H : S T R I N G = n o n e
)
elseif ( CMAKE_SYSTEM_NAME STREQUAL "Linux" )
set ( _curl_platform_flags
$ { _ c u r l _ p l a t f o r m _ f l a g s }
- D C M A K E _ U S E _ O P E N S S L : B O O L = O N
- D C U R L _ C A _ P A T H : S T R I N G = n o n e
- D C U R L _ C A _ B U N D L E : S T R I N G = n o n e
- D C U R L _ C A _ F A L L B A C K : B O O L = O N
)
endif ( )
2022-05-16 12:02:46 +00:00
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 ) > > C M a k e / c u r l - c o n f i g . c m a k e . i n )
endif ( )
2021-03-20 15:16:50 +00:00
prusaslicer_add_cmake_project ( CURL
2021-03-23 17:47:22 +00:00
# GIT_REPOSITORY https://github.com/curl/curl.git
# GIT_TAG curl-7_75_0
U R L h t t p s : / / g i t h u b . c o m / c u r l / c u r l / a r c h i v e / r e f s / t a g s / c u r l - 7 _ 7 5 _ 0 . z i p
U R L _ H A S H S H A 2 5 6 = a 6 3 a e 0 2 5 b b 0 a 1 4 f 1 1 9 e 7 3 2 5 0 f 2 c 9 2 3 f 4 b f 8 9 a a 9 3 b 8 d 4 f a f a 4 a 9 f 5 3 5 3 a 9 6 a 7 6 5 a
2021-03-20 15:16:50 +00:00
D E P E N D S $ { Z L I B _ P K G }
# PATCH_COMMAND ${GIT_EXECUTABLE} checkout -f -- . && git clean -df &&
# ${GIT_EXECUTABLE} apply --whitespace=fix ${CMAKE_CURRENT_LIST_DIR}/curl-mods.patch
2022-05-16 12:02:46 +00:00
P A T C H _ C O M M A N D " $ { _ p a t c h _ c o m m a n d } "
2021-03-20 15:16:50 +00:00
C M A K E _ A R G S
- D B U I L D _ T E S T I N G : B O O L = O F F
- D C M A K E _ P O S I T I O N _ I N D E P E N D E N T _ C O D E = O N
$ { _ c u r l _ p l a t f o r m _ f l a g s }
)
if ( CMAKE_SYSTEM_NAME STREQUAL "Linux" )
add_dependencies ( dep_CURL dep_OpenSSL )
endif ( )
if ( MSVC )
add_debug_dep ( dep_CURL )
endif ( )