diff options
Diffstat (limited to 'indra/cmake')
-rw-r--r-- | indra/cmake/00-Common.cmake | 15 | ||||
-rw-r--r-- | indra/cmake/APR.cmake | 1 | ||||
-rw-r--r-- | indra/cmake/CMakeLists.txt | 2 | ||||
-rw-r--r-- | indra/cmake/Copy3rdPartyLibs.cmake | 14 | ||||
-rw-r--r-- | indra/cmake/FMODSTUDIO.cmake | 2 | ||||
-rw-r--r-- | indra/cmake/GLEXT.cmake | 6 | ||||
-rw-r--r-- | indra/cmake/ICU4C.cmake | 23 | ||||
-rw-r--r-- | indra/cmake/LLAddBuildTest.cmake | 14 | ||||
-rw-r--r-- | indra/cmake/LLMath.cmake | 3 | ||||
-rw-r--r-- | indra/cmake/Linking.cmake | 1 | ||||
-rw-r--r-- | indra/cmake/Mikktspace.cmake | 6 | ||||
-rw-r--r-- | indra/cmake/Python.cmake | 4 | ||||
-rw-r--r-- | indra/cmake/TinyGLTF.cmake | 7 | ||||
-rw-r--r-- | indra/cmake/Tracy.cmake | 5 | ||||
-rw-r--r-- | indra/cmake/Variables.cmake | 20 | ||||
-rw-r--r-- | indra/cmake/ViewerMiscLibs.cmake | 3 | ||||
-rw-r--r-- | indra/cmake/VulkanGltf.cmake | 5 |
17 files changed, 101 insertions, 30 deletions
diff --git a/indra/cmake/00-Common.cmake b/indra/cmake/00-Common.cmake index c708199309..24534c98d9 100644 --- a/indra/cmake/00-Common.cmake +++ b/indra/cmake/00-Common.cmake @@ -26,6 +26,11 @@ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} $ENV{LL_BUILD}") # Portable compilation flags. add_compile_definitions( ADDRESS_SIZE=${ADDRESS_SIZE}) +# Because older versions of Boost.Bind dumped placeholders _1, _2 et al. into +# the global namespace, Boost now requires either BOOST_BIND_NO_PLACEHOLDERS +# to avoid that or BOOST_BIND_GLOBAL_PLACEHOLDERS to state that we require it +# -- which we do. Without one or the other, we get a ton of Boost warnings. +add_compile_definitions(BOOST_BIND_GLOBAL_PLACEHOLDERS) # Configure crash reporting set(RELEASE_CRASH_REPORTING OFF CACHE BOOL "Enable use of crash reporting in release builds") @@ -55,15 +60,6 @@ if (WINDOWS) # http://www.cmake.org/pipermail/cmake/2009-September/032143.html string(REPLACE "/Zm1000" " " CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS}) - # Without PreferredToolArchitecture=x64, as of 2020-06-26 the 32-bit - # compiler on our TeamCity build hosts has started running out of virtual - # memory for the precompiled header file. - # CP changed to only append the flag for 32bit builds - on 64bit builds, - # locally at least, the build output is spammed with 1000s of 'D9002' - # warnings about this switch being ignored. - if(ADDRESS_SIZE EQUAL 32 AND DEFINED ENV{"TEAMCITY_PROJECT_NAME"}) - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /p:PreferredToolArchitecture=x64") - endif() # zlib has assembly-language object files incompatible with SAFESEH add_link_options(/LARGEADDRESSAWARE /SAFESEH:NO @@ -191,3 +187,4 @@ if (LINUX OR DARWIN) endif (LINUX OR DARWIN) + diff --git a/indra/cmake/APR.cmake b/indra/cmake/APR.cmake index 2dd221f69e..21139319c3 100644 --- a/indra/cmake/APR.cmake +++ b/indra/cmake/APR.cmake @@ -36,7 +36,6 @@ else (WINDOWS) target_link_libraries( ll::apr INTERFACE apr-1 aprutil-1 - iconv uuid rt ) diff --git a/indra/cmake/CMakeLists.txt b/indra/cmake/CMakeLists.txt index f0b35c08f3..05c51c018d 100644 --- a/indra/cmake/CMakeLists.txt +++ b/indra/cmake/CMakeLists.txt @@ -30,6 +30,7 @@ set(cmake_SOURCE_FILES GoogleMock.cmake Havok.cmake Hunspell.cmake + ICU4C.cmake JsonCpp.cmake LLAddBuildTest.cmake LLAppearance.cmake @@ -64,6 +65,7 @@ set(cmake_SOURCE_FILES VisualLeakDetector.cmake LibVLCPlugin.cmake XmlRpcEpi.cmake + xxHash.cmake ZLIBNG.cmake ) diff --git a/indra/cmake/Copy3rdPartyLibs.cmake b/indra/cmake/Copy3rdPartyLibs.cmake index d43cc30706..9f79c13a97 100644 --- a/indra/cmake/Copy3rdPartyLibs.cmake +++ b/indra/cmake/Copy3rdPartyLibs.cmake @@ -57,12 +57,20 @@ if(WINDOWS) openjp2.dll libapr-1.dll libaprutil-1.dll - libapriconv-1.dll nghttp2.dll libhunspell.dll uriparser.dll ) + # ICU4C (same filenames for 32 and 64 bit builds) + set(release_files ${release_files} icudt48.dll) + set(release_files ${release_files} icuin48.dll) + set(release_files ${release_files} icuio48.dll) + set(release_files ${release_files} icule48.dll) + set(release_files ${release_files} iculx48.dll) + set(release_files ${release_files} icutu48.dll) + set(release_files ${release_files} icuuc48.dll) + # OpenSSL if(ADDRESS_SIZE EQUAL 64) set(release_files ${release_files} libcrypto-1_1-x64.dll) @@ -87,7 +95,8 @@ if(WINDOWS) endif (USE_BUGSPLAT) if (TARGET ll::fmodstudio) - set(debug_files ${debug_files} fmodL.dll) + # fmodL is included for logging, only one should be picked by manifest + set(release_files ${release_files} fmodL.dll) set(release_files ${release_files} fmod.dll) endif () @@ -172,7 +181,6 @@ elseif(DARWIN) libndofdev.dylib libnghttp2.dylib libnghttp2.14.dylib - libnghttp2.14.19.0.dylib liburiparser.dylib liburiparser.1.dylib liburiparser.1.0.27.dylib diff --git a/indra/cmake/FMODSTUDIO.cmake b/indra/cmake/FMODSTUDIO.cmake index c5b21ac4e5..9a1cdff6cb 100644 --- a/indra/cmake/FMODSTUDIO.cmake +++ b/indra/cmake/FMODSTUDIO.cmake @@ -2,7 +2,7 @@ include_guard() -# FMODSTUDIO can be set when launching the make using the argument -DFMODSTUDIO:BOOL=ON +# FMODSTUDIO can be set when launching the make using the argument -DUSE_FMODSTUDIO:BOOL=ON # When building using proprietary binaries though (i.e. having access to LL private servers), # we always build with FMODSTUDIO. if (INSTALL_PROPRIETARY) diff --git a/indra/cmake/GLEXT.cmake b/indra/cmake/GLEXT.cmake index 434b6f0ee8..a780966f0c 100644 --- a/indra/cmake/GLEXT.cmake +++ b/indra/cmake/GLEXT.cmake @@ -3,9 +3,7 @@ include(Prebuilt) include(GLH) add_library( ll::glext INTERFACE IMPORTED ) -if (WINDOWS OR LINUX) - use_system_binary(glext) - use_prebuilt_binary(glext) -endif (WINDOWS OR LINUX) +use_system_binary(glext) +use_prebuilt_binary(glext) diff --git a/indra/cmake/ICU4C.cmake b/indra/cmake/ICU4C.cmake new file mode 100644 index 0000000000..7b27665483 --- /dev/null +++ b/indra/cmake/ICU4C.cmake @@ -0,0 +1,23 @@ +# -*- cmake -*- +include(Prebuilt) + +include_guard() + +add_library( ll::icu4c INTERFACE IMPORTED ) + + +use_system_binary(icu4c) +use_prebuilt_binary(icu4c) +if (WINDOWS) + target_link_libraries( ll::icu4c INTERFACE icuuc) +elseif(DARWIN) + target_link_libraries( ll::icu4c INTERFACE icuuc) +#elseif(LINUX) +## target_link_libraries( ll::icu4c INTERFACE ) +else() + message(FATAL_ERROR "Invalid platform") +endif() + +target_include_directories( ll::icu4c SYSTEM INTERFACE ${LIBS_PREBUILT_DIR}/include/unicode ) + +use_prebuilt_binary(dictionaries) diff --git a/indra/cmake/LLAddBuildTest.cmake b/indra/cmake/LLAddBuildTest.cmake index bf569e5d99..2172b56da2 100644 --- a/indra/cmake/LLAddBuildTest.cmake +++ b/indra/cmake/LLAddBuildTest.cmake @@ -126,6 +126,13 @@ MACRO(LL_ADD_PROJECT_UNIT_TESTS project sources) message("LL_ADD_PROJECT_UNIT_TESTS ${name}_test_additional_CFLAGS ${${name}_test_additional_CFLAGS}") endif() + if (DARWIN) + # test binaries always need to be signed for local development + set_target_properties(PROJECT_${project}_TEST_${name} + PROPERTIES + XCODE_ATTRIBUTE_CODE_SIGN_IDENTITY "-") + endif () + # # Setup test targets # @@ -221,6 +228,13 @@ FUNCTION(LL_ADD_INTEGRATION_TEST ) endif () + if (DARWIN) + # test binaries always need to be signed for local development + set_target_properties(INTEGRATION_TEST_${testname} + PROPERTIES + XCODE_ATTRIBUTE_CODE_SIGN_IDENTITY "-") + endif () + # Add link deps to the executable if(TEST_DEBUG) message(STATUS "TARGET_LINK_LIBRARIES(INTEGRATION_TEST_${testname} ${libraries})") diff --git a/indra/cmake/LLMath.cmake b/indra/cmake/LLMath.cmake index a707c75bc4..e841d2ac78 100644 --- a/indra/cmake/LLMath.cmake +++ b/indra/cmake/LLMath.cmake @@ -1,2 +1,5 @@ # -*- cmake -*- +include(Variables) +include(Mikktspace) + diff --git a/indra/cmake/Linking.cmake b/indra/cmake/Linking.cmake index 4a501f420b..1ce21c11f9 100644 --- a/indra/cmake/Linking.cmake +++ b/indra/cmake/Linking.cmake @@ -62,6 +62,7 @@ elseif (WINDOWS) user32 ole32 dbghelp + rpcrt4.lib legacy_stdio_definitions ) else() diff --git a/indra/cmake/Mikktspace.cmake b/indra/cmake/Mikktspace.cmake new file mode 100644 index 0000000000..9fd2becba4 --- /dev/null +++ b/indra/cmake/Mikktspace.cmake @@ -0,0 +1,6 @@ +# -*- cmake -*- +include(Prebuilt) + +if (NOT USESYSTEMLIBS) + use_prebuilt_binary(mikktspace) +endif (NOT USESYSTEMLIBS) diff --git a/indra/cmake/Python.cmake b/indra/cmake/Python.cmake index f9259f6c2b..da5d2ef22c 100644 --- a/indra/cmake/Python.cmake +++ b/indra/cmake/Python.cmake @@ -13,7 +13,7 @@ elseif (WINDOWS) foreach(hive HKEY_CURRENT_USER HKEY_LOCAL_MACHINE) # prefer more recent Python versions to older ones, if multiple versions # are installed - foreach(pyver 3.11 3.10 3.9 3.8 3.7) + foreach(pyver 3.12 3.11 3.10 3.9 3.8 3.7) list(APPEND regpaths "[${hive}\\SOFTWARE\\Python\\PythonCore\\${pyver}\\InstallPath]") endforeach() endforeach() @@ -40,7 +40,7 @@ elseif (WINDOWS) ${regpaths} ${pymaybe} ) - include(FindPythonInterp) + find_package(Python3 COMPONENTS Interpreter) else() find_program(python python3) diff --git a/indra/cmake/TinyGLTF.cmake b/indra/cmake/TinyGLTF.cmake new file mode 100644 index 0000000000..bb731637a0 --- /dev/null +++ b/indra/cmake/TinyGLTF.cmake @@ -0,0 +1,7 @@ +# -*- cmake -*- +include(Prebuilt) + +use_prebuilt_binary(tinygltf) + +set(TINYGLTF_INCLUDE_DIR ${LIBS_PREBUILT_DIR}/include/tinygltf) + diff --git a/indra/cmake/Tracy.cmake b/indra/cmake/Tracy.cmake index b3de06a876..32c02edb93 100644 --- a/indra/cmake/Tracy.cmake +++ b/indra/cmake/Tracy.cmake @@ -11,8 +11,9 @@ if (USE_TRACY) use_prebuilt_binary(tracy) target_include_directories( ll::tracy SYSTEM INTERFACE ${LIBS_PREBUILT_DIR}/include/tracy) + target_link_libraries( ll::tracy INTERFACE TracyClient ) -# See: indra/llcommon/llprofiler.h - target_compile_definitions(ll::tracy INTERFACE LL_PROFILER_CONFIGURATION=3 ) + # See: indra/llcommon/llprofiler.h + add_compile_definitions(LL_PROFILER_CONFIGURATION=3) endif (USE_TRACY) diff --git a/indra/cmake/Variables.cmake b/indra/cmake/Variables.cmake index e6285ab48b..af1f16d04d 100644 --- a/indra/cmake/Variables.cmake +++ b/indra/cmake/Variables.cmake @@ -33,7 +33,7 @@ set(LIBS_OPEN_PREFIX) set(SCRIPTS_PREFIX ../scripts) set(VIEWER_PREFIX) set(INTEGRATION_TESTS_PREFIX) -set(LL_TESTS ON CACHE BOOL "Build and run unit and integration tests (disable for build timing runs to reduce variation") +set(LL_TESTS OFF CACHE BOOL "Build and run unit and integration tests (disable for build timing runs to reduce variation") set(INCREMENTAL_LINK OFF CACHE BOOL "Use incremental linking on win32 builds (enable for faster links on some machines)") set(ENABLE_MEDIA_PLUGINS ON CACHE BOOL "Turn off building media plugins if they are imported by third-party library mechanism") set(VIEWER_SYMBOL_FILE "" CACHE STRING "Name of tarball into which to place symbol files") @@ -173,13 +173,17 @@ if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin") set(CMAKE_XCODE_ATTRIBUTE_GCC_OPTIMIZATION_LEVEL "${CMAKE_MATCH_1}") message(STATUS "CMAKE_XCODE_ATTRIBUTE_GCC_OPTIMIZATION_LEVEL = '${CMAKE_XCODE_ATTRIBUTE_GCC_OPTIMIZATION_LEVEL}'") - string(REGEX MATCHALL "[^ ]+" LL_BUILD_LIST "$ENV{LL_BUILD}") - list(FIND LL_BUILD_LIST "-iwithsysroot" sysroot_idx) - if ("${sysroot_idx}" LESS 0) - message(FATAL_ERROR "Environment variable LL_BUILD must contain '-iwithsysroot'") - endif () - math(EXPR sysroot_idx "${sysroot_idx} + 1") - list(GET LL_BUILD_LIST "${sysroot_idx}" CMAKE_OSX_SYSROOT) + # allow disabling this check by setting LL_SKIP_REQUIRE_SYSROOT either ON as cmake cache var or non-empty as environment var + set(LL_SKIP_REQUIRE_SYSROOT OFF CACHE BOOL "Skip requirement to set toolchain sysroot ahead of time. Not skipped by default for consistency, but skipping can be useful for selecting alternative xcode versions side by side") + if("$ENV{LL_SKIP_REQUIRE_SYSROOT}" STREQUAL "" AND NOT ${LL_SKIP_REQUIRE_SYSROOT}) + string(REGEX MATCHALL "[^ ]+" LL_BUILD_LIST "$ENV{LL_BUILD}") + list(FIND LL_BUILD_LIST "-iwithsysroot" sysroot_idx) + if ("${sysroot_idx}" LESS 0) + message(FATAL_ERROR "Environment variable LL_BUILD must contain '-iwithsysroot'") + endif () + math(EXPR sysroot_idx "${sysroot_idx} + 1") + list(GET LL_BUILD_LIST "${sysroot_idx}" CMAKE_OSX_SYSROOT) + endif() message(STATUS "CMAKE_OSX_SYSROOT = '${CMAKE_OSX_SYSROOT}'") set(CMAKE_XCODE_ATTRIBUTE_GCC_VERSION "com.apple.compilers.llvm.clang.1_0") diff --git a/indra/cmake/ViewerMiscLibs.cmake b/indra/cmake/ViewerMiscLibs.cmake index 00f8b77106..cae68fbc11 100644 --- a/indra/cmake/ViewerMiscLibs.cmake +++ b/indra/cmake/ViewerMiscLibs.cmake @@ -18,3 +18,6 @@ endif() use_prebuilt_binary(slvoice) +use_prebuilt_binary(nanosvg) +use_prebuilt_binary(viewer-fonts) +use_prebuilt_binary(emoji_shortcodes) diff --git a/indra/cmake/VulkanGltf.cmake b/indra/cmake/VulkanGltf.cmake new file mode 100644 index 0000000000..94541d5307 --- /dev/null +++ b/indra/cmake/VulkanGltf.cmake @@ -0,0 +1,5 @@ +# -*- cmake -*- +include(Prebuilt) + +use_prebuilt_binary(vulkan_gltf) + |