summaryrefslogtreecommitdiff
path: root/indra/llcorehttp
diff options
context:
space:
mode:
authorBrad Linden <brad@lindenlab.com>2023-03-29 14:54:06 -0700
committerBrad Linden <brad@lindenlab.com>2023-03-29 14:54:06 -0700
commita548c169899734b7d6af1a1870dab1ad1eb74e3c (patch)
treea347ee3cd54b7bcb317061af9af2abb2a6dad243 /indra/llcorehttp
parentb130831106d058f0be5414a9a3bcaa99636c7bc0 (diff)
parentc7053a6928fd5eafdc935453742e92951ae4e0c1 (diff)
Merge remote-tracking branch 'origin/main' into DRTVWR-559
Diffstat (limited to 'indra/llcorehttp')
-rw-r--r--indra/llcorehttp/CMakeLists.txt62
1 files changed, 17 insertions, 45 deletions
diff --git a/indra/llcorehttp/CMakeLists.txt b/indra/llcorehttp/CMakeLists.txt
index c591680250..87796abd3c 100644
--- a/indra/llcorehttp/CMakeLists.txt
+++ b/indra/llcorehttp/CMakeLists.txt
@@ -10,19 +10,10 @@ include(NGHTTP2)
include(ZLIBNG)
include(LLCoreHttp)
include(LLAddBuildTest)
-include(LLMessage)
include(LLCommon)
include(Tut)
include(bugsplat)
-include_directories (${CMAKE_CURRENT_SOURCE_DIR})
-
-include_directories(
- ${LLMESSAGE_INCLUDE_DIRS}
- ${LLCOMMON_INCLUDE_DIRS}
- ${LLCOREHTTP_INCLUDE_DIRS}
- )
-
set(llcorehttp_SOURCE_FILES
bufferarray.cpp
bufferstream.cpp
@@ -80,8 +71,6 @@ set(llcorehttp_HEADER_FILES
_thread.h
)
-set_source_files_properties(${llcorehttp_HEADER_FILES}
- PROPERTIES HEADER_FILE_ONLY TRUE)
if (DARWIN OR LINUX)
# Boost headers define unused members in condition_variable so...
set_source_files_properties(${llcorehttp_SOURCE_FILES}
@@ -92,14 +81,17 @@ list(APPEND llcorehttp_SOURCE_FILES ${llcorehttp_HEADER_FILES})
add_library (llcorehttp ${llcorehttp_SOURCE_FILES})
target_link_libraries(
- llcorehttp
- ${CURL_LIBRARIES}
- ${OPENSSL_LIBRARIES}
- ${CRYPTO_LIBRARIES}
- ${NGHTTP2_LIBRARIES}
- ${BOOST_THREAD_LIBRARY}
- ${BOOST_SYSTEM_LIBRARY}
+ llcorehttp
+ llcommon
+ ll::libcurl
+ ll::openssl
+ ll::nghttp2
)
+target_include_directories( llcorehttp INTERFACE ${CMAKE_CURRENT_SOURCE_DIR})
+# llmessage depends on llcorehttp, yet llcorehttp also depends on llmessage (at least for includes).
+# Cannot/Should not use target_link_libraries here to add llmessage to the dependencies, as that would
+# lead to circular dependencies (or in case of cmake, the first project declaring it's dependencies wins)
+target_include_directories( llcorehttp PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/../llmessage)
# tests
set(LLCOREHTTP_TESTS ON CACHE BOOL
@@ -119,26 +111,15 @@ if (LL_TESTS AND LLCOREHTTP_TESTS)
tests/test_bufferstream.hpp
)
- set_source_files_properties(${llcorehttp_TEST_HEADER_FILES}
- PROPERTIES HEADER_FILE_ONLY TRUE)
-
list(APPEND llcorehttp_TEST_SOURCE_FILES ${llcorehttp_TEST_HEADER_FILES})
# LL_ADD_PROJECT_UNIT_TESTS(llcorehttp "${llcorehttp_TEST_SOURCE_FILES}")
# set(TEST_DEBUG on)
set(test_libs
- ${LLCOREHTTP_LIBRARIES}
- ${WINDOWS_LIBRARIES}
- ${LLMESSAGE_LIBRARIES}
- ${LLCOMMON_LIBRARIES}
- ${GOOGLEMOCK_LIBRARIES}
- ${CURL_LIBRARIES}
- ${OPENSSL_LIBRARIES}
- ${CRYPTO_LIBRARIES}
- ${NGHTTP2_LIBRARIES}
- ${BOOST_THREAD_LIBRARY}
- ${BOOST_SYSTEM_LIBRARY}
+ llcorehttp
+ llmessage
+ llcommon
)
# If http_proxy is in the current environment (e.g. to fetch s3-proxy
@@ -155,7 +136,7 @@ if (LL_TESTS AND LLCOREHTTP_TESTS)
if (DARWIN)
# Path inside the app bundle where we'll need to copy libraries
set(LL_TEST_DESTINATION_DIR
- ${CMAKE_BINARY_DIR}/sharedlibs/Resources
+ ${CMAKE_BINARY_DIR}/sharedlibs/$<IF:$<BOOL:${LL_GENERATOR_IS_MULTI_CONFIG}>,,../>Resources
)
# Create the Contents/Resources directory
@@ -200,18 +181,9 @@ endif (DARWIN)
)
set(example_libs
- ${LEGACY_STDIO_LIBS}
- ${LLCOREHTTP_LIBRARIES}
- ${WINDOWS_LIBRARIES}
- ${LLMESSAGE_LIBRARIES}
- ${LLCOMMON_LIBRARIES}
- ${GOOGLEMOCK_LIBRARIES}
- ${CURL_LIBRARIES}
- ${OPENSSL_LIBRARIES}
- ${CRYPTO_LIBRARIES}
- ${NGHTTP2_LIBRARIES}
- ${BOOST_THREAD_LIBRARY}
- ${BOOST_SYSTEM_LIBRARY}
+ llcorehttp
+ llmessage
+ llcommon
)
add_executable(http_texture_load