summaryrefslogtreecommitdiff
path: root/indra/cmake
diff options
context:
space:
mode:
Diffstat (limited to 'indra/cmake')
-rw-r--r--indra/cmake/00-Common.cmake12
-rw-r--r--indra/cmake/CMakeLists.txt1
-rw-r--r--indra/cmake/OpenXR.cmake22
-rw-r--r--indra/cmake/Tracy.cmake7
4 files changed, 35 insertions, 7 deletions
diff --git a/indra/cmake/00-Common.cmake b/indra/cmake/00-Common.cmake
index d51ae77662..3d2b4e7406 100644
--- a/indra/cmake/00-Common.cmake
+++ b/indra/cmake/00-Common.cmake
@@ -73,9 +73,12 @@ if (WINDOWS)
/NODEFAULTLIB:LIBCMT
/IGNORE:4099)
- add_definitions(
- -DNOMINMAX
-# /DDOM_DYNAMIC # For shared library colladadom
+ add_compile_definitions(
+ WIN32_LEAN_AND_MEAN
+ NOMINMAX
+# DOM_DYNAMIC # For shared library colladadom
+ _CRT_SECURE_NO_WARNINGS # Allow use of sprintf etc
+ _WINSOCK_DEPRECATED_NO_WARNINGS # Disable deprecated WinSock API warnings
)
add_compile_options(
/Zo
@@ -111,9 +114,6 @@ if (WINDOWS)
string(REPLACE "/Zi" "/Z7" CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS_RELWITHDEBINFO}")
string(REPLACE "/Zi" "/Z7" CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO}")
endif()
-
- # Allow use of sprintf etc
- add_compile_definitions(_CRT_SECURE_NO_WARNINGS)
endif (WINDOWS)
if (LINUX OR CMAKE_SYSTEM_NAME MATCHES "FreeBSD")
diff --git a/indra/cmake/CMakeLists.txt b/indra/cmake/CMakeLists.txt
index f4d7589746..5525ac9f24 100644
--- a/indra/cmake/CMakeLists.txt
+++ b/indra/cmake/CMakeLists.txt
@@ -26,6 +26,7 @@ set(cmake_SOURCE_FILES
FreeType.cmake
GLEXT.cmake
GLH.cmake
+ GLM.cmake
Havok.cmake
Hunspell.cmake
LLAddBuildTest.cmake
diff --git a/indra/cmake/OpenXR.cmake b/indra/cmake/OpenXR.cmake
new file mode 100644
index 0000000000..2cc862b927
--- /dev/null
+++ b/indra/cmake/OpenXR.cmake
@@ -0,0 +1,22 @@
+# -*- cmake -*-
+
+include(Prebuilt)
+
+include_guard()
+add_library( ll::openxr INTERFACE IMPORTED )
+
+if(USE_CONAN )
+ target_link_libraries( ll::openxr INTERFACE CONAN_PKG::openxr )
+ return()
+endif()
+
+use_prebuilt_binary(openxr)
+if (WINDOWS)
+ target_link_libraries( ll::openxr INTERFACE ${ARCH_PREBUILT_DIRS_RELEASE}/openxr_loader.lib )
+else()
+ target_link_libraries( ll::openxr INTERFACE ${ARCH_PREBUILT_DIRS_RELEASE}/libopenxr_loader.a )
+endif (WINDOWS)
+
+if( NOT LINUX )
+ target_include_directories( ll::openxr SYSTEM INTERFACE ${LIBS_PREBUILT_DIR}/include)
+endif()
diff --git a/indra/cmake/Tracy.cmake b/indra/cmake/Tracy.cmake
index d54a32fdc2..a7eac2711f 100644
--- a/indra/cmake/Tracy.cmake
+++ b/indra/cmake/Tracy.cmake
@@ -6,7 +6,7 @@ add_library( ll::tracy INTERFACE IMPORTED )
# default Tracy profiling on for test builds, but off for all others
string(TOLOWER ${VIEWER_CHANNEL} channel_lower)
-if(WINDOWS AND channel_lower MATCHES "^second life test")
+if(channel_lower MATCHES "^second life test")
option(USE_TRACY "Use Tracy profiler." ON)
else()
option(USE_TRACY "Use Tracy profiler." OFF)
@@ -31,6 +31,11 @@ if (USE_TRACY)
target_compile_definitions(ll::tracy INTERFACE -DTRACY_NO_BROADCAST=1 -DTRACY_ONLY_LOCALHOST=1)
endif ()
+ # GHA runners don't always provide invariant TSC support, but always build with LL_TESTS enabled
+ if (DARWIN AND LL_TESTS)
+ target_compile_definitions(ll::tracy INTERFACE -DTRACY_TIMER_FALLBACK=1)
+ endif ()
+
# See: indra/llcommon/llprofiler.h
add_compile_definitions(LL_PROFILER_CONFIGURATION=3)
endif (USE_TRACY)