summaryrefslogtreecommitdiff
path: root/indra/cmake/CURL.cmake
diff options
context:
space:
mode:
authorCallum Prentice <callum@lindenlab.com>2023-04-03 14:58:58 -0700
committerCallum Prentice <callum@lindenlab.com>2023-04-03 14:58:58 -0700
commit28b240fd7fc39ff4668e37b5aa3bdfe392415b34 (patch)
tree923892b5ea9e9ac4d757fba089f0e9b2b24fbf26 /indra/cmake/CURL.cmake
parent7b9866791ac7922f7527811bbc99c090f35e4cfd (diff)
parentc7053a6928fd5eafdc935453742e92951ae4e0c1 (diff)
DRTVWR-489: Fix things up after a messy merge with main because of a gigantic CMake patch. Sadly, my macOS box updated to Xcode14.3 overnight and that caused many warnings/errors with variables being initialized and then used but not in a way that affected anything.. Building on Xcode 14.3 also requires that MACOSX_DEPLOYMENT_TARGET be set to > 10.13. Waiting on a decision about that but checking this in in the meantime. Builds on macOS with appropriate build variables set for MACOSX_DEPLOYMENT_TARGET = 10.14 but not really expecting this to build in TC because (REDACTED). Windows version probably hopelessly broken - switching to that now.
Diffstat (limited to 'indra/cmake/CURL.cmake')
-rw-r--r--indra/cmake/CURL.cmake25
1 files changed, 10 insertions, 15 deletions
diff --git a/indra/cmake/CURL.cmake b/indra/cmake/CURL.cmake
index 04afae594d..b9f685f37b 100644
--- a/indra/cmake/CURL.cmake
+++ b/indra/cmake/CURL.cmake
@@ -1,19 +1,14 @@
# -*- cmake -*-
include(Prebuilt)
-set(CURL_FIND_QUIETLY ON)
-set(CURL_FIND_REQUIRED ON)
+include_guard()
+add_library( ll::libcurl INTERFACE IMPORTED )
-if (USESYSTEMLIBS)
- include(FindCURL)
-else (USESYSTEMLIBS)
- use_prebuilt_binary(curl)
- if (WINDOWS)
- set(CURL_LIBRARIES
- debug libcurld.lib
- optimized libcurl.lib)
- else (WINDOWS)
- set(CURL_LIBRARIES libcurl.a)
- endif (WINDOWS)
- set(CURL_INCLUDE_DIRS ${LIBS_PREBUILT_DIR}/include)
-endif (USESYSTEMLIBS)
+use_system_binary(libcurl)
+use_prebuilt_binary(curl)
+if (WINDOWS)
+ target_link_libraries(ll::libcurl INTERFACE libcurl.lib)
+else (WINDOWS)
+ target_link_libraries(ll::libcurl INTERFACE libcurl.a)
+endif (WINDOWS)
+target_include_directories( ll::libcurl SYSTEM INTERFACE ${LIBS_PREBUILT_DIR}/include)