From a763de1cfa21a184e0c941c5a3618125af366939 Mon Sep 17 00:00:00 2001 From: Erik Kundiman Date: Tue, 11 Jul 2023 16:29:26 +0800 Subject: No GoogleMock, AddBuildTest & Tut when no LL_TESTS --- indra/llcorehttp/CMakeLists.txt | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'indra/llcorehttp') diff --git a/indra/llcorehttp/CMakeLists.txt b/indra/llcorehttp/CMakeLists.txt index 87796abd3c..4fda964eb6 100644 --- a/indra/llcorehttp/CMakeLists.txt +++ b/indra/llcorehttp/CMakeLists.txt @@ -3,15 +3,21 @@ project(llcorehttp) include(00-Common) +if (LL_TESTS) include(GoogleMock) +endif () include(CURL) include(OpenSSL) include(NGHTTP2) include(ZLIBNG) include(LLCoreHttp) +if (LL_TESTS) include(LLAddBuildTest) +endif () include(LLCommon) +if (LL_TESTS) include(Tut) +endif () include(bugsplat) set(llcorehttp_SOURCE_FILES -- cgit v1.3 From 5776c0a692ad2848339d3bef9cae18032d6ad23a Mon Sep 17 00:00:00 2001 From: Erik Kundiman Date: Sat, 29 Jul 2023 12:58:51 +0800 Subject: Fix newer libcurl from not being able to download System libcurl, which is typically newer, doesn't accept when SL server responses with an invalid Content-Encoding value (usually some value that's probably meant to be put as the Content-Type value), that we'd get "unrecognized or bad HTTP Content or Transfer-Encoding" https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Accept-Encoding A way to fix this would be to just not expect decompressed contents, by letting libcurl have the default value for CURLOPT_ACCEPT_ENCODING, which is NULL. --- indra/llcorehttp/_httpoprequest.cpp | 4 ++-- indra/llcorehttp/httpcommon.cpp | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) (limited to 'indra/llcorehttp') diff --git a/indra/llcorehttp/_httpoprequest.cpp b/indra/llcorehttp/_httpoprequest.cpp index ba31290c24..6c408c6687 100644 --- a/indra/llcorehttp/_httpoprequest.cpp +++ b/indra/llcorehttp/_httpoprequest.cpp @@ -508,7 +508,7 @@ HttpStatus HttpOpRequest::prepareRequest(HttpService * service) check_curl_easy_setopt(mCurlHandle, CURLOPT_NOPROGRESS, 1); check_curl_easy_setopt(mCurlHandle, CURLOPT_URL, mReqURL.c_str()); check_curl_easy_setopt(mCurlHandle, CURLOPT_PRIVATE, getHandle()); - check_curl_easy_setopt(mCurlHandle, CURLOPT_ENCODING, ""); + //check_curl_easy_setopt(mCurlHandle, CURLOPT_ENCODING, ""); check_curl_easy_setopt(mCurlHandle, CURLOPT_AUTOREFERER, 1); check_curl_easy_setopt(mCurlHandle, CURLOPT_MAXREDIRS, HTTP_REDIRECTS_DEFAULT); @@ -598,7 +598,7 @@ HttpStatus HttpOpRequest::prepareRequest(HttpService * service) case HOR_POST: { check_curl_easy_setopt(mCurlHandle, CURLOPT_POST, 1); - check_curl_easy_setopt(mCurlHandle, CURLOPT_ENCODING, ""); + //check_curl_easy_setopt(mCurlHandle, CURLOPT_ENCODING, ""); long data_size(0); if (mReqBody) { diff --git a/indra/llcorehttp/httpcommon.cpp b/indra/llcorehttp/httpcommon.cpp index 61ba83594e..856602e50b 100644 --- a/indra/llcorehttp/httpcommon.cpp +++ b/indra/llcorehttp/httpcommon.cpp @@ -289,8 +289,10 @@ CURL *getCurlTemplateHandle() check_curl_code(result, CURLOPT_NOSIGNAL); result = curl_easy_setopt(curlpTemplateHandle, CURLOPT_NOPROGRESS, 1); check_curl_code(result, CURLOPT_NOPROGRESS); + /* result = curl_easy_setopt(curlpTemplateHandle, CURLOPT_ENCODING, ""); check_curl_code(result, CURLOPT_ENCODING); + */ result = curl_easy_setopt(curlpTemplateHandle, CURLOPT_AUTOREFERER, 1); check_curl_code(result, CURLOPT_AUTOREFERER); result = curl_easy_setopt(curlpTemplateHandle, CURLOPT_FOLLOWLOCATION, 1); -- cgit v1.3 From 665a55a1a232877ccb499dbfd17806f438385e82 Mon Sep 17 00:00:00 2001 From: Erik Kundiman Date: Sat, 29 Jul 2023 21:07:13 +0800 Subject: The Linden libraries can be installed now Useful when installed as shared libraries, so other viewer executables can share these libraries. --- indra/cmake/LibraryInstall.cmake | 4 ++++ indra/llappearance/CMakeLists.txt | 2 ++ indra/llcharacter/CMakeLists.txt | 2 ++ indra/llcommon/CMakeLists.txt | 7 +++++++ indra/llcorehttp/CMakeLists.txt | 2 ++ indra/llcrashlogger/CMakeLists.txt | 2 ++ indra/llfilesystem/CMakeLists.txt | 2 ++ indra/llimage/CMakeLists.txt | 2 ++ indra/llimagej2coj/CMakeLists.txt | 1 + indra/llinventory/CMakeLists.txt | 2 ++ indra/llmath/CMakeLists.txt | 3 +++ indra/llmeshoptimizer/CMakeLists.txt | 2 ++ indra/llmessage/CMakeLists.txt | 3 +++ indra/llplugin/CMakeLists.txt | 1 + indra/llprimitive/CMakeLists.txt | 2 ++ indra/llprimitive/llphysicsextensions/CMakeLists.txt | 6 ++++++ indra/llrender/CMakeLists.txt | 1 + indra/llui/CMakeLists.txt | 2 ++ indra/llwindow/CMakeLists.txt | 2 ++ indra/llxml/CMakeLists.txt | 1 + indra/viewer_components/login/CMakeLists.txt | 14 ++++++++------ 21 files changed, 57 insertions(+), 6 deletions(-) create mode 100644 indra/cmake/LibraryInstall.cmake (limited to 'indra/llcorehttp') diff --git a/indra/cmake/LibraryInstall.cmake b/indra/cmake/LibraryInstall.cmake new file mode 100644 index 0000000000..5a55c215ed --- /dev/null +++ b/indra/cmake/LibraryInstall.cmake @@ -0,0 +1,4 @@ +list(REMOVE_ITEM ${PROJECT_NAME}_HEADER_FILES CMakeLists.txt) +install(FILES ${${PROJECT_NAME}_HEADER_FILES} + DESTINATION include/${PROJECT_NAME}) +install(TARGETS ${PROJECT_NAME} DESTINATION lib) diff --git a/indra/llappearance/CMakeLists.txt b/indra/llappearance/CMakeLists.txt index 75c0e276eb..e6ca2d753a 100644 --- a/indra/llappearance/CMakeLists.txt +++ b/indra/llappearance/CMakeLists.txt @@ -86,3 +86,5 @@ if (BUILD_HEADLESS) llcommon ) endif (BUILD_HEADLESS) + +include(LibraryInstall) diff --git a/indra/llcharacter/CMakeLists.txt b/indra/llcharacter/CMakeLists.txt index bc45eb474a..7c158c4ff9 100644 --- a/indra/llcharacter/CMakeLists.txt +++ b/indra/llcharacter/CMakeLists.txt @@ -70,3 +70,5 @@ target_link_libraries( llfilesystem llxml ) + +include(LibraryInstall) diff --git a/indra/llcommon/CMakeLists.txt b/indra/llcommon/CMakeLists.txt index 758d746d54..ed7ac8deb7 100644 --- a/indra/llcommon/CMakeLists.txt +++ b/indra/llcommon/CMakeLists.txt @@ -158,6 +158,7 @@ set(llcommon_HEADER_FILES lleventdispatcher.h lleventfilter.h llevents.h + lleventtimer.h lleventemitter.h llexception.h llfasttimer.h @@ -181,12 +182,14 @@ set(llcommon_HEADER_FILES llliveappconfig.h lllivefile.h llmainthreadtask.h + llmake.h llmd5.h llmemory.h llmemorystream.h llmetrics.h llmetricperformancetester.h llmortician.h + llmutex.h llnametable.h llpointer.h llprofiler.h @@ -243,7 +246,9 @@ set(llcommon_HEADER_FILES llwin32headerslean.h llworkerthread.h hbxxh.h + is_approx_equal_fraction.h lockstatic.h + mutex.h stdtypes.h stringize.h threadpool.h @@ -289,6 +294,8 @@ else () endif() endif () +include(LibraryInstall) + if (LL_TESTS) include(LLAddBuildTest) SET(llcommon_TEST_SOURCE_FILES diff --git a/indra/llcorehttp/CMakeLists.txt b/indra/llcorehttp/CMakeLists.txt index 4fda964eb6..01ccdc048a 100644 --- a/indra/llcorehttp/CMakeLists.txt +++ b/indra/llcorehttp/CMakeLists.txt @@ -99,6 +99,8 @@ target_include_directories( llcorehttp INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}) # 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) +include(LibraryInstall) + # tests set(LLCOREHTTP_TESTS ON CACHE BOOL "Build and run llcorehttp integration tests specifically") diff --git a/indra/llcrashlogger/CMakeLists.txt b/indra/llcrashlogger/CMakeLists.txt index 6ac73c0d32..3506a35c1e 100644 --- a/indra/llcrashlogger/CMakeLists.txt +++ b/indra/llcrashlogger/CMakeLists.txt @@ -21,3 +21,5 @@ list(APPEND llcrashlogger_SOURCE_FILES ${llcrashlogger_HEADER_FILES}) add_library(llcrashlogger ${llcrashlogger_SOURCE_FILES}) target_link_libraries( llcrashlogger llcommon llmessage llcorehttp llxml llfilesystem ) + +include(LibraryInstall) diff --git a/indra/llfilesystem/CMakeLists.txt b/indra/llfilesystem/CMakeLists.txt index 23193a30ea..6e9cec9085 100644 --- a/indra/llfilesystem/CMakeLists.txt +++ b/indra/llfilesystem/CMakeLists.txt @@ -56,6 +56,8 @@ target_link_libraries(llfilesystem ) target_include_directories( llfilesystem INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}) +include(LibraryInstall) + # Add tests if (LL_TESTS) include(LLAddBuildTest) diff --git a/indra/llimage/CMakeLists.txt b/indra/llimage/CMakeLists.txt index f1eed409cd..a6c98d9bd7 100644 --- a/indra/llimage/CMakeLists.txt +++ b/indra/llimage/CMakeLists.txt @@ -73,6 +73,8 @@ if (NOT (USE_AUTOBUILD_3P OR USE_CONAN)) endif() endif () +include(LibraryInstall) + # Add tests if (LL_TESTS) SET(llimage_TEST_SOURCE_FILES diff --git a/indra/llimagej2coj/CMakeLists.txt b/indra/llimagej2coj/CMakeLists.txt index 5bd4c75426..5a2aac9e84 100644 --- a/indra/llimagej2coj/CMakeLists.txt +++ b/indra/llimagej2coj/CMakeLists.txt @@ -28,3 +28,4 @@ target_link_libraries( llimagej2coj ll::openjpeg ) +include(LibraryInstall) diff --git a/indra/llinventory/CMakeLists.txt b/indra/llinventory/CMakeLists.txt index 93a586759f..88a2c33ae0 100644 --- a/indra/llinventory/CMakeLists.txt +++ b/indra/llinventory/CMakeLists.txt @@ -59,6 +59,8 @@ add_library (llinventory ${llinventory_SOURCE_FILES}) target_link_libraries( llinventory llcommon llmath llmessage llxml ) target_include_directories( llinventory INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}) +include(LibraryInstall) + #add unit tests if (LL_TESTS) INCLUDE(LLAddBuildTest) diff --git a/indra/llmath/CMakeLists.txt b/indra/llmath/CMakeLists.txt index 955bade204..fe13d17fce 100644 --- a/indra/llmath/CMakeLists.txt +++ b/indra/llmath/CMakeLists.txt @@ -59,6 +59,7 @@ set(llmath_HEADER_FILES llmath.h llmatrix3a.h llmatrix3a.inl + llmatrix4a.h llmodularmath.h lloctree.h llperlin.h @@ -103,6 +104,8 @@ include_directories(${CMAKE_SOURCE_DIR}/llmeshoptimizer) target_link_libraries(llmath llcommon) target_include_directories( llmath INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}) +include(LibraryInstall) + # Add tests if (LL_TESTS) include(LLAddBuildTest) diff --git a/indra/llmeshoptimizer/CMakeLists.txt b/indra/llmeshoptimizer/CMakeLists.txt index dfac44c296..1511e75b39 100644 --- a/indra/llmeshoptimizer/CMakeLists.txt +++ b/indra/llmeshoptimizer/CMakeLists.txt @@ -30,5 +30,7 @@ target_link_libraries(llmeshoptimizer llmath ll::meshoptimizer) +include(LibraryInstall) + # Add tests diff --git a/indra/llmessage/CMakeLists.txt b/indra/llmessage/CMakeLists.txt index 92a5f783e0..d5db3d8b1b 100644 --- a/indra/llmessage/CMakeLists.txt +++ b/indra/llmessage/CMakeLists.txt @@ -136,6 +136,7 @@ set(llmessage_HEADER_FILES llmessagebuilder.h llmessageconfig.h llmessagereader.h + llmessagesenderinterface.h llmessagetemplate.h llmessagetemplateparser.h llmessagethrottle.h @@ -210,6 +211,8 @@ if (NOT (USE_AUTOBUILD_3P OR USE_CONAN)) endif() endif () +include(LibraryInstall) + # tests if (LL_TESTS) SET(llmessage_TEST_SOURCE_FILES diff --git a/indra/llplugin/CMakeLists.txt b/indra/llplugin/CMakeLists.txt index 14a69afe6e..19ce47d357 100644 --- a/indra/llplugin/CMakeLists.txt +++ b/indra/llplugin/CMakeLists.txt @@ -46,3 +46,4 @@ target_include_directories( llplugin INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}) target_link_libraries( llplugin llcommon llmath llrender llmessage ) add_subdirectory(slplugin) +include(LibraryInstall) diff --git a/indra/llprimitive/CMakeLists.txt b/indra/llprimitive/CMakeLists.txt index 3a3de75cd0..f26ab747af 100644 --- a/indra/llprimitive/CMakeLists.txt +++ b/indra/llprimitive/CMakeLists.txt @@ -72,6 +72,8 @@ if (NOT (USE_AUTOBUILD_3P OR USE_CONAN)) add_subdirectory(llphysicsextensions) endif () +include(LibraryInstall) + #add unit tests if (LL_TESTS) INCLUDE(LLAddBuildTest) diff --git a/indra/llprimitive/llphysicsextensions/CMakeLists.txt b/indra/llprimitive/llphysicsextensions/CMakeLists.txt index c950fc6560..c204dea264 100644 --- a/indra/llprimitive/llphysicsextensions/CMakeLists.txt +++ b/indra/llprimitive/llphysicsextensions/CMakeLists.txt @@ -74,6 +74,12 @@ list(APPEND llphysicsextensionsstub_SOURCE_FILES ${llphysicsextensions_HEADER_FI add_library(${PROJECT_NAME}stub ${${PROJECT_NAME}_SOURCE_FILES}) target_include_directories(${PROJECT_NAME}stub INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}) target_link_libraries(${PROJECT_NAME}stub llmath llcommon) +list(REMOVE_ITEM ${PROJECT_NAME}_HEADER_FILES + LLPathingLibStubImpl.h + LLConvexDecompositionStubImpl.h + LLPhysicsExtensionsStubImpl.h) +install(FILES ${${PROJECT_NAME}_HEADER_FILES} DESTINATION include/${PROJECT_NAME}) +install(TARGETS ${PROJECT_NAME}stub DESTINATION lib) if (LINUX) IF(CMAKE_BUILD_TYPE MATCHES Release) diff --git a/indra/llrender/CMakeLists.txt b/indra/llrender/CMakeLists.txt index c5cf1100d5..ea8947155e 100644 --- a/indra/llrender/CMakeLists.txt +++ b/indra/llrender/CMakeLists.txt @@ -102,3 +102,4 @@ target_link_libraries(llrender OpenGL::GLU ) +include(LibraryInstall) diff --git a/indra/llui/CMakeLists.txt b/indra/llui/CMakeLists.txt index 9108c6143c..06416df09b 100644 --- a/indra/llui/CMakeLists.txt +++ b/indra/llui/CMakeLists.txt @@ -266,6 +266,8 @@ target_link_libraries(llui llcommon ) +include(LibraryInstall) + # Add tests if(LL_TESTS) include(LLAddBuildTest) diff --git a/indra/llwindow/CMakeLists.txt b/indra/llwindow/CMakeLists.txt index 53b104dab2..cc44c1e2a1 100644 --- a/indra/llwindow/CMakeLists.txt +++ b/indra/llwindow/CMakeLists.txt @@ -186,3 +186,5 @@ if (DARWIN) find_library(CARBON_LIBRARY Carbon) target_link_libraries(llwindow ${CARBON_LIBRARY}) endif (DARWIN) + +include(LibraryInstall) diff --git a/indra/llxml/CMakeLists.txt b/indra/llxml/CMakeLists.txt index 508c2b919b..748e3e8b61 100644 --- a/indra/llxml/CMakeLists.txt +++ b/indra/llxml/CMakeLists.txt @@ -34,6 +34,7 @@ target_link_libraries( llxml ) target_include_directories( llxml INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}) +include(LibraryInstall) # tests diff --git a/indra/viewer_components/login/CMakeLists.txt b/indra/viewer_components/login/CMakeLists.txt index 8381803b03..d33b6d78f7 100644 --- a/indra/viewer_components/login/CMakeLists.txt +++ b/indra/viewer_components/login/CMakeLists.txt @@ -1,6 +1,6 @@ # -*- cmake -*- -project(login) +project(lllogin) include(00-Common) if(LL_TESTS) @@ -9,21 +9,21 @@ endif(LL_TESTS) include(LLCommon) include(LLCoreHttp) -set(login_SOURCE_FILES +set(lllogin_SOURCE_FILES lllogin.cpp ) -set(login_HEADER_FILES +set(lllogin_HEADER_FILES lllogin.h ) list(APPEND - login_SOURCE_FILES - ${login_HEADER_FILES} + lllogin_SOURCE_FILES + ${lllogin_HEADER_FILES} ) add_library(lllogin - ${login_SOURCE_FILES} + ${lllogin_SOURCE_FILES} ) target_include_directories( lllogin INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}) @@ -35,6 +35,8 @@ target_link_libraries(lllogin llxml ) +include(LibraryInstall) + if(LL_TESTS) SET(lllogin_TEST_SOURCE_FILES lllogin.cpp -- cgit v1.3