From 0e5251f7cea691cbe62db2dc587aecd293ec73ed Mon Sep 17 00:00:00 2001 From: Nicky Date: Sat, 17 Sep 2022 16:50:38 +0200 Subject: [PATCH 1/9] cmake playing jedi mind tricks on me and making me miss one genex that needed changing. Interstingly add_custom_target will not complain about a file that would never be declared as OUTPUT and thus is not really a valid cmake build target.`` --- indra/newview/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index 74faf3d1b6..6bddea25a1 100644 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -1830,7 +1830,7 @@ if (WINDOWS) ) add_custom_target(llpackage ALL DEPENDS - ${CMAKE_CURRENT_BINARY_DIR}/$,$,>/touched.bat + ${CMAKE_CFG_INTDIR}/touched.bat ) # temporarily disable packaging of event_host until hg subrepos get # sorted out on the parabuild cluster... From e840b5eb40edbac8e72054256112deeaf5c580c2 Mon Sep 17 00:00:00 2001 From: Nicky Dasmijn Date: Sat, 17 Sep 2022 17:37:45 +0200 Subject: [PATCH 2/9] MacOs packaging is weird, as Nat already did point out :( Part of his change was omly taking Release builds into account, the other part from me made the same mistake. Use a generator expression with a custom command to get the symlink the way we want. --- indra/cmake/Copy3rdPartyLibs.cmake | 18 +++++++++--------- indra/test/CMakeLists.txt | 18 +++++++++--------- 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/indra/cmake/Copy3rdPartyLibs.cmake b/indra/cmake/Copy3rdPartyLibs.cmake index b265c92e45..5bb988d639 100644 --- a/indra/cmake/Copy3rdPartyLibs.cmake +++ b/indra/cmake/Copy3rdPartyLibs.cmake @@ -152,15 +152,6 @@ if(WINDOWS) endforeach() elseif(DARWIN) - # Support our "@executable_path/../Resources" load path for executables - # that end up in any of the above SHARED_LIB_STAGING_DIR_MUMBLE - # directories. - # Cannot use ${SHARED_LIB_STAGING_DIR} here as it used a generator expression and tha this not - # supported by file(...) - file(MAKE_DIRECTORY "${CMAKE_BINARY_DIR}/sharedlibs/Release/Resources") - file(CREATE_LINK "${CMAKE_BINARY_DIR}/sharedlibs/Release/Resources" "${CMAKE_BINARY_DIR}/sharedlibs/Resources" - SYMBOLIC) - set(vivox_lib_dir "${ARCH_PREBUILT_DIRS_RELEASE}") set(slvoice_files SLVoice) set(vivox_libs @@ -299,3 +290,12 @@ add_custom_target( stage_third_party_libs ALL DEPENDS ${third_party_targets} ) + +if(DARWIN) + # Support our "@executable_path/../Resources" load path for executables + # that end up in any of the above SHARED_LIB_STAGING_DIR_MUMBLE + # directories. + add_custom_command( TARGET stage_third_party_libs POST_BUILD + COMMAND cmake -E create_symlink ${SHARED_LIB_STAGING_DIR} ${CMAKE_BINARY_DIR}/sharedlibs/Resources + ) +endif() \ No newline at end of file diff --git a/indra/test/CMakeLists.txt b/indra/test/CMakeLists.txt index c913e4031f..48c15155a6 100644 --- a/indra/test/CMakeLists.txt +++ b/indra/test/CMakeLists.txt @@ -74,15 +74,6 @@ if (WINDOWS) LINK_FLAGS "/NODEFAULTLIB:LIBCMT" LINK_FLAGS_DEBUG "/NODEFAULTLIB:\"LIBCMT;LIBCMTD;MSVCRT\"" ) -elseif (DARWIN) - # Support our "@executable_path/../Resources" load path for our test - # executable. This SHOULD properly be "$/Resources", - # but the CMake $ generator expression isn't evaluated by - # CREATE_LINK, so fudge it. - # Make sure the symlink's parent directory exists... - file(MAKE_DIRECTORY "${CMAKE_BINARY_DIR}/test") - file(CREATE_LINK "../sharedlibs/Release/Resources" "${CMAKE_BINARY_DIR}/test/Resources" - SYMBOLIC) endif (WINDOWS) set(TEST_EXE $) @@ -111,4 +102,13 @@ set(test_results ${CMAKE_CURRENT_BINARY_DIR}/cpp_tests_ok.txt) # developers choose to disable LL_TESTS. if (LL_TESTS) add_custom_target(tests_ok ALL DEPENDS ${test_results}) + if(DARWIN) + # Support our "@executable_path/../Resources" load path for our test + # executable. This SHOULD properly be "$/Resources", + # but the CMake $ generator expression isn't evaluated by + # CREATE_LINK, so fudge it. + add_custom_command( TARGET tests_ok PRE_BUILD + COMMAND cmake -E create_symlink ${SHARED_LIB_STAGING_DIR} ${CMAKE_BINARY_DIR}/test/Resource + ) + endif() endif (LL_TESTS) From c47b2ae7458f88941e4a129b0bc9aa96ab4ae003 Mon Sep 17 00:00:00 2001 From: Nicky Dasmijn Date: Sat, 17 Sep 2022 17:58:08 +0200 Subject: [PATCH 3/9] We probably want this (have to guess as I cannot run the tests). --- indra/test/CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/indra/test/CMakeLists.txt b/indra/test/CMakeLists.txt index 48c15155a6..b7a39a7450 100644 --- a/indra/test/CMakeLists.txt +++ b/indra/test/CMakeLists.txt @@ -107,8 +107,8 @@ if (LL_TESTS) # executable. This SHOULD properly be "$/Resources", # but the CMake $ generator expression isn't evaluated by # CREATE_LINK, so fudge it. - add_custom_command( TARGET tests_ok PRE_BUILD - COMMAND cmake -E create_symlink ${SHARED_LIB_STAGING_DIR} ${CMAKE_BINARY_DIR}/test/Resource + add_custom_command( TARGET lltest POST_BUILD + COMMAND cmake -E create_symlink ${SHARED_LIB_STAGING_DIR} ${CMAKE_BINARY_DIR}/test/Resources ) endif() endif (LL_TESTS) From c7366f4c55c6442414eb6c5a6736baf90f1a4700 Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Sat, 17 Sep 2022 02:09:04 +0300 Subject: [PATCH 4/9] SL-17238 Fix coding policy build issues --- indra/CMakeLists.txt | 2 +- indra/cmake/Copy3rdPartyLibs.cmake | 13 ++++++------- indra/cmake/LLCommon.cmake | 2 +- indra/cmake/LLCoreHttp.cmake | 2 +- indra/cmake/LLPrimitive.cmake | 4 ++-- indra/cmake/Prebuilt.cmake | 14 +++++++------- indra/cmake/UI.cmake | 4 ++-- indra/llaudio/CMakeLists.txt | 2 +- indra/llcommon/CMakeLists.txt | 3 +-- indra/llprimitive/CMakeLists.txt | 2 +- indra/llwindow/CMakeLists.txt | 4 ++-- 11 files changed, 25 insertions(+), 27 deletions(-) diff --git a/indra/CMakeLists.txt b/indra/CMakeLists.txt index ff6a68ff97..205ce402a0 100644 --- a/indra/CMakeLists.txt +++ b/indra/CMakeLists.txt @@ -128,7 +128,7 @@ add_subdirectory(${VIEWER_PREFIX}doxygen EXCLUDE_FROM_ALL) set_property( DIRECTORY ${VIEWER_PREFIX} PROPERTY VS_STARTUP_PROJECT ${VIEWER_BINARY_NAME} - ) + ) if (LL_TESTS) # Define after the custom targets are created so diff --git a/indra/cmake/Copy3rdPartyLibs.cmake b/indra/cmake/Copy3rdPartyLibs.cmake index 5bb988d639..7495de00d5 100644 --- a/indra/cmake/Copy3rdPartyLibs.cmake +++ b/indra/cmake/Copy3rdPartyLibs.cmake @@ -216,7 +216,7 @@ elseif(LINUX) list( APPEND release_files libapr-1.so.0 libaprutil-1.so.0 - libatk-1.0.so + libatk-1.0.so libfreetype.so.6.6.2 libfreetype.so.6 libhunspell-1.3.so.0.0.0 @@ -224,12 +224,11 @@ elseif(LINUX) libuuid.so.16.0.22 libfontconfig.so.1.8.0 libfontconfig.so.1 - libgmodule-2.0.so - libgobject-2.0.so + libgmodule-2.0.so + libgobject-2.0.so ) - endif() - - + endif() + if (TARGET ll::fmodstudio) set(debug_files ${debug_files} "libfmodL.so") set(release_files ${release_files} "libfmod.so") @@ -298,4 +297,4 @@ if(DARWIN) add_custom_command( TARGET stage_third_party_libs POST_BUILD COMMAND cmake -E create_symlink ${SHARED_LIB_STAGING_DIR} ${CMAKE_BINARY_DIR}/sharedlibs/Resources ) -endif() \ No newline at end of file +endif() diff --git a/indra/cmake/LLCommon.cmake b/indra/cmake/LLCommon.cmake index e56625d051..92045f7b58 100644 --- a/indra/cmake/LLCommon.cmake +++ b/indra/cmake/LLCommon.cmake @@ -7,4 +7,4 @@ include(Tracy) include(ZLIBNG) include(JsonCpp) -include(XmlRpcEpi) \ No newline at end of file +include(XmlRpcEpi) diff --git a/indra/cmake/LLCoreHttp.cmake b/indra/cmake/LLCoreHttp.cmake index a166c96043..22ed5fef9c 100644 --- a/indra/cmake/LLCoreHttp.cmake +++ b/indra/cmake/LLCoreHttp.cmake @@ -2,4 +2,4 @@ include(CURL) include(OpenSSL) -include(NGHTTP2) \ No newline at end of file +include(NGHTTP2) diff --git a/indra/cmake/LLPrimitive.cmake b/indra/cmake/LLPrimitive.cmake index 04afe5e405..3d8499cbc3 100644 --- a/indra/cmake/LLPrimitive.cmake +++ b/indra/cmake/LLPrimitive.cmake @@ -14,8 +14,8 @@ add_library( ll::colladadom INTERFACE IMPORTED ) # ND, needs fixup in collada conan pkg if( USE_CONAN ) target_include_directories( ll::colladadom SYSTEM INTERFACE - "${CONAN_INCLUDE_DIRS_COLLADADOM}/collada-dom/" - "${CONAN_INCLUDE_DIRS_COLLADADOM}/collada-dom/1.4/" ) + "${CONAN_INCLUDE_DIRS_COLLADADOM}/collada-dom/" + "${CONAN_INCLUDE_DIRS_COLLADADOM}/collada-dom/1.4/" ) endif() use_system_binary( colladadom ) diff --git a/indra/cmake/Prebuilt.cmake b/indra/cmake/Prebuilt.cmake index f0239711aa..634cc15c21 100644 --- a/indra/cmake/Prebuilt.cmake +++ b/indra/cmake/Prebuilt.cmake @@ -60,13 +60,13 @@ endmacro (use_prebuilt_binary _binary) #Sadly we need a macro here, otherwise the return() will not properly work macro ( use_system_binary package ) if( USE_CONAN ) - target_link_libraries( ll::${package} INTERFACE CONAN_PKG::${package} ) - foreach( extra_pkg "${ARGN}" ) - if( extra_pkg ) - target_link_libraries( ll::${package} INTERFACE CONAN_PKG::${extra_pkg} ) - endif() - endforeach() + target_link_libraries( ll::${package} INTERFACE CONAN_PKG::${package} ) + foreach( extra_pkg "${ARGN}" ) + if( extra_pkg ) + target_link_libraries( ll::${package} INTERFACE CONAN_PKG::${extra_pkg} ) + endif() + endforeach() return() endif() endmacro() - + diff --git a/indra/cmake/UI.cmake b/indra/cmake/UI.cmake index c02ad3e161..8b70192efc 100644 --- a/indra/cmake/UI.cmake +++ b/indra/cmake/UI.cmake @@ -8,8 +8,8 @@ if (LINUX) target_compile_definitions(ll::uilibraries INTERFACE LL_GTK=1 LL_X11=1 ) if( USE_CONAN ) - target_link_libraries( ll::uilibraries INTERFACE CONAN_PKG::gtk ) - return() + target_link_libraries( ll::uilibraries INTERFACE CONAN_PKG::gtk ) + return() endif() use_prebuilt_binary(gtk-atk-pango-glib) diff --git a/indra/llaudio/CMakeLists.txt b/indra/llaudio/CMakeLists.txt index d6846ddf99..4f469b9bb5 100644 --- a/indra/llaudio/CMakeLists.txt +++ b/indra/llaudio/CMakeLists.txt @@ -68,4 +68,4 @@ if( TARGET ll::openal ) endif() if( TARGET ll::fmodstudio ) target_link_libraries( llaudio ll::fmodstudio ) -endif() \ No newline at end of file +endif() diff --git a/indra/llcommon/CMakeLists.txt b/indra/llcommon/CMakeLists.txt index 8625060720..b576cdc1e1 100644 --- a/indra/llcommon/CMakeLists.txt +++ b/indra/llcommon/CMakeLists.txt @@ -268,8 +268,7 @@ target_link_libraries( ll::boost ll::uriparser ll::oslibraries - ll::tracy - + ll::tracy ) target_include_directories( llcommon INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}) diff --git a/indra/llprimitive/CMakeLists.txt b/indra/llprimitive/CMakeLists.txt index 7d83dc77c1..d69cd958a0 100644 --- a/indra/llprimitive/CMakeLists.txt +++ b/indra/llprimitive/CMakeLists.txt @@ -63,7 +63,7 @@ target_link_libraries(llprimitive llphysicsextensions_impl ll::colladadom ll::pcre - ll::glh_linear + ll::glh_linear ) #add unit tests diff --git a/indra/llwindow/CMakeLists.txt b/indra/llwindow/CMakeLists.txt index cc60625683..dbab58c5de 100644 --- a/indra/llwindow/CMakeLists.txt +++ b/indra/llwindow/CMakeLists.txt @@ -54,8 +54,8 @@ set(llwindow_LINK_LIBRARIES llrender llfilesystem llxml - ll::glh_linear - ll::glext + ll::glh_linear + ll::glext ll::uilibraries ll::SDL ) From 9bad5d08fb8c5b705c9c620b0e809b20968a39be Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Sat, 17 Sep 2022 02:10:35 +0300 Subject: [PATCH 5/9] SL-17238 Large cmake contribution by NickyD --- doc/contributions.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/doc/contributions.txt b/doc/contributions.txt index 2c1e5487ce..86b42a5ff0 100755 --- a/doc/contributions.txt +++ b/doc/contributions.txt @@ -1122,6 +1122,7 @@ Nicky Dasmijn SL-14541 SL-16438 SL-17218 + SL-17238 Nicky Perian OPEN-1 STORM-1087 From c333a7935d33b30fb663739c567cec5ae661ffe8 Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Sat, 17 Sep 2022 02:38:52 +0300 Subject: [PATCH 6/9] SL-17238 Fixed llphysicsextensions connection to llrender --- .gitignore | 7 ++----- autobuild.xml | 8 ++++---- 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/.gitignore b/.gitignore index 839d14bc0d..80eca667df 100755 --- a/.gitignore +++ b/.gitignore @@ -20,11 +20,8 @@ indra/.distcc build-vc80/ build-vc100/ build-vc120/ -build-vc120-32/ -build-vc120-64/ -build-vc150-32/ -build-vc150-64/ -build-vc160-64/ +build-vc*-32/ +build-vc*-64/ indra/CMakeFiles indra/build-vc[0-9]* indra/lib/mono/1.0/*.dll diff --git a/autobuild.xml b/autobuild.xml index 59bac89136..985bb55902 100644 --- a/autobuild.xml +++ b/autobuild.xml @@ -1659,9 +1659,9 @@ archive hash - da57838d80cf332f4a3026713a13f086 + e51c6f5dfd76eb148348a44ff57e66c2 url - https://s3-proxy.lindenlab.com/private-builds-secondlife-com/ct2/90708/824484/llphysicsextensions_source-1.0.565754-darwin64-565754.tar.bz2 + https://s3-proxy.lindenlab.com/private-builds-secondlife-com/ct2/104810/918016/llphysicsextensions_source-1.0.575107-darwin64-575107.tar.bz2 name darwin64 @@ -1683,9 +1683,9 @@ archive hash - 28ad884012aa0bb70cf4101853af2f9a + dbbe4cc568ac149d862e421cdda4dd48 url - https://s3-proxy.lindenlab.com/private-builds-secondlife-com/ct2/90733/824570/llphysicsextensions_source-1.0.565768-windows-565768.tar.bz2 + https://s3-proxy.lindenlab.com/private-builds-secondlife-com/ct2/104809/918011/llphysicsextensions_source-1.0.575107-windows-575107.tar.bz2 name windows From c82f70ecace4e57bcaeada695d3a59ddb498b19e Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Sat, 17 Sep 2022 13:48:01 +0300 Subject: [PATCH 7/9] SL-17238 bugsplat build issues --- indra/newview/llappviewerwin32.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indra/newview/llappviewerwin32.cpp b/indra/newview/llappviewerwin32.cpp index a39ec7f51b..6457c13ef3 100644 --- a/indra/newview/llappviewerwin32.cpp +++ b/indra/newview/llappviewerwin32.cpp @@ -75,7 +75,7 @@ // Bugsplat (http://bugsplat.com) crash reporting tool #ifdef LL_BUGSPLAT #include "BugSplat.h" -#include "reader.h" // JsonCpp +#include "json/reader.h" // JsonCpp #include "llagent.h" // for agent location #include "llviewerregion.h" #include "llvoavatarself.h" // for agent name From 7471788271174a673db10426b11db418928e1dd7 Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Sat, 17 Sep 2022 14:30:40 +0300 Subject: [PATCH 8/9] SL-17238 MacOS build does not recognize no-unused-but-set-variable --- indra/cmake/00-Common.cmake | 2 +- indra/cmake/Linking.cmake | 8 ++++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/indra/cmake/00-Common.cmake b/indra/cmake/00-Common.cmake index a144973a16..f1348dbad5 100644 --- a/indra/cmake/00-Common.cmake +++ b/indra/cmake/00-Common.cmake @@ -180,7 +180,7 @@ if (LINUX OR DARWIN) list(APPEND GCC_WARNINGS -Werror) endif (NOT GCC_DISABLE_FATAL_WARNINGS) - list(APPEND GCC_WARNINGS -Wno-reorder -Wno-non-virtual-dtor -Wno-unused-but-set-variable -Wno-unused-variable ) + list(APPEND GCC_WARNINGS -Wno-reorder -Wno-non-virtual-dtor -Wno-unused-variable ) add_compile_options(${GCC_WARNINGS}) add_compile_options(-m${ADDRESS_SIZE}) diff --git a/indra/cmake/Linking.cmake b/indra/cmake/Linking.cmake index 5edb713cfa..4a501f420b 100644 --- a/indra/cmake/Linking.cmake +++ b/indra/cmake/Linking.cmake @@ -11,8 +11,12 @@ if (WINDOWS OR DARWIN ) # Kludge for older cmake versions, 3.20+ is needed to use a genex in add_custom_command( OUTPUT ... ) # Using this will work okay-ish, as Debug is not supported anyway. But for property multi config and also # ninja support the genex version is preferred. - if(${CMAKE_VERSION} VERSION_LESS "3.20.0") - set(SHARED_LIB_STAGING_DIR ${CMAKE_BINARY_DIR}/sharedlibs/Release) + if(${CMAKE_VERSION} VERSION_LESS "3.20.0") + if(CMAKE_BUILD_TYPE MATCHES Release) + set(SHARED_LIB_STAGING_DIR ${CMAKE_BINARY_DIR}/sharedlibs/Release) + elseif (CMAKE_BUILD_TYPE MATCHES RelWithDebInfo) + set(SHARED_LIB_STAGING_DIR ${CMAKE_BINARY_DIR}/sharedlibs/RelWithDebInfo) + endif() else() set(SHARED_LIB_STAGING_DIR ${CMAKE_BINARY_DIR}/sharedlibs/$,$,>) endif() From 3c6e2a6e4c061add79b7a8eae96a6271148d278b Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Sat, 17 Sep 2022 21:27:43 +0300 Subject: [PATCH 9/9] SL-17238 Supress errors from physicsextensions --- indra/newview/CMakeLists.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index 6bddea25a1..966630d1fc 100644 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -66,6 +66,9 @@ if (NOT HAVOK_TPV) endif() if( TARGET llphysicsextensions ) target_link_libraries(llphysicsextensions llrender ) + if (DARWIN) + target_compile_options( llphysicsextensions PRIVATE -Wno-unused-local-typedef) + endif (DARWIN) endif() endif (NOT HAVOK_TPV)