Skip to content

Commit

Permalink
find CURL after toolchain file is loaded
Browse files Browse the repository at this point in the history
  • Loading branch information
Luke Gehorsam committed Feb 2, 2024
1 parent 72ecbf0 commit 491e88a
Showing 1 changed file with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -80,15 +80,6 @@ else()
set(WS_IO_COMPILE_DEFINITION WITH_EXTERNAL_WS_IO)
endif()

if (BUILD_CURL_IO_SYSTEM OR BUILD_CURL_IO OR BUILD_CURL_HTTP_SYSTEM OR BUILD_CURL_HTTP)
if (BUILD_CURL_IO_SYSTEM OR BUILD_CURL_HTTP_SYSTEM)
find_package(CURL REQUIRED) # system curl not guaranteed to contain a CMake config file.
else()
find_package(CURL CONFIG REQUIRED)
endif()
endif()


cmake_policy(SET CMP0012 NEW)

## force so that gradle doesn't stomp vcpkg toolchain with the android toolchain
Expand Down Expand Up @@ -146,6 +137,14 @@ if(APPLE AND BUILD_SHARED_LIBS AND BUILD_APPLE_FRAMEWORK)

endif()

if (BUILD_CURL_IO_SYSTEM OR BUILD_CURL_IO OR BUILD_CURL_HTTP_SYSTEM OR BUILD_CURL_HTTP)
if (BUILD_CURL_IO_SYSTEM OR BUILD_CURL_HTTP_SYSTEM)
find_package(CURL REQUIRED) # system curl not guaranteed to contain a CMake config file.
else()
find_package(CURL CONFIG REQUIRED)
endif()
endif()

if(WS_IMPL STREQUAL "libhttpclient" OR HTTP_IMPL STREQUAL "libhttpclient")
if (NOT LIBHTTPCLIENT_BUILTIN)
if (LINUX OR APPLE)
Expand Down

0 comments on commit 491e88a

Please sign in to comment.