File tree Expand file tree Collapse file tree 1 file changed +10
-5
lines changed
Expand file tree Collapse file tree 1 file changed +10
-5
lines changed Original file line number Diff line number Diff line change @@ -33,7 +33,7 @@ if(NOT USERVER_FORCE_DOWNLOAD_CURL)
3333 message (
3434 FATAL_ERROR
3535 "libcurl versions from 7.88.0 to 8.1.2 may crash on HTTP/2 "
36- "requests and thus are unsupported, upgrade or turn on " " USERVER_DOWNLOAD_PACKAGE_CURL"
36+ "requests and thus are unsupported, upgrade or turn on USERVER_DOWNLOAD_PACKAGE_CURL"
3737 )
3838 endif ()
3939 else ()
@@ -42,9 +42,15 @@ if(NOT USERVER_FORCE_DOWNLOAD_CURL)
4242 endif ()
4343endif ()
4444
45- set (CURL_LTO_OPTION )
45+ set (CURL_EXTRA_OPTIONS )
4646if (USERVER_LTO)
47- set (CURL_LTO_OPTION "CURL_LTO ON" )
47+ list (APPEND CURL_EXTRA_OPTIONS "CURL_LTO ON" )
48+ endif ()
49+
50+ find_package (libnghttp2 REQUIRED)
51+
52+ if (CPM_PACKAGE_libnghttp2_SOURCE_DIR)
53+ list (APPEND CURL_EXTRA_OPTIONS "NGHTTP2_INCLUDE_DIR ${NGHTTP2_INCLUDE_DIR} " "NGHTTP2_LIBRARY ${NGHTTP2_LIBRARY} " )
4854endif ()
4955
5056include (DownloadUsingCPM)
@@ -55,8 +61,7 @@ cpmaddpackage(
5561 GIT_TAG curl-7_81_0
5662 GIT_SHALLOW TRUE
5763 OPTIONS "BUILD_CURL_EXE OFF" "BUILD_SHARED_LIBS OFF" "CURL_DISABLE_TESTS ON" "CURL_DISABLE_LDAP ON"
58- "HAVE_DLOPEN TRUE" "USE_NGHTTP2 TRUE"
59- "NGHTTP2_INCLUDE_DIR ${NGHTTP2_INCLUDE_DIR} " "NGHTTP2_LIBRARY ${NGHTTP2_LIBRARY} " ${CURL_LTO_OPTION}
64+ "HAVE_DLOPEN TRUE" "USE_NGHTTP2 TRUE" ${CURL_EXTRA_OPTIONS}
6065)
6166
6267mark_targets_as_system("${CURL_SOURCE_DIR} " )
You can’t perform that action at this time.
0 commit comments