Skip to content

Commit

Permalink
Fix offline builds OWN_CURL_SOURCE_DIR
Browse files Browse the repository at this point in the history
  • Loading branch information
ChristopherHX authored Mar 24, 2023
1 parent 63bd44d commit 43309f3
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion ext/curl.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,15 @@ else()
endif()
endif()

if(OWN_CURL_SOURCE_DIR)
set(CURL_EXT_PROPERTIES SOURCE_DIR ${OWN_CURL_SOURCE_DIR})
else()
set(CURL_EXT_PROPERTIES URL "http://curl.haxx.se/download/curl-8.0.1.tar.gz")
endif()

ExternalProject_Add(
curl_ext
URL "http://curl.haxx.se/download/curl-8.0.1.tar.gz"
${CURL_EXT_PROPERTIES}
INSTALL_DIR ${CMAKE_BINARY_DIR}/ext/curl
CMAKE_ARGS "-DCMAKE_INSTALL_PREFIX=${CMAKE_BINARY_DIR}/ext/curl" "-DBUILD_CURL_EXE=OFF" "-DBUILD_SHARED_LIBS=OFF" "-DCURL_STATICLIB=ON" "-DCURL_DISABLE_LDAP=ON" "-DCURL_USE_LIBSSH2=OFF" "-DCURL_USE_OPENLDAP=OFF" "-DUSE_LIBIDN2=OFF" "-DENABLE_WEBSOCKETS=ON" "-DCMAKE_C_FLAGS=${CMAKE_C_FLAGS}" "-DCMAKE_LINK_FLAGS=${CMAKE_LINK_FLAGS}" "-DCMAKE_LIBRARY_ARCHITECTURE=${CMAKE_LIBRARY_ARCHITECTURE}" ${CURL_EXT_EXTRA_OPTIONS}
)
Expand Down

0 comments on commit 43309f3

Please sign in to comment.