summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorNicky <nicky.dasmijn@posteo.nl>2022-06-05 16:15:55 +0200
committerNicky <nicky.dasmijn@posteo.nl>2022-06-05 16:15:55 +0200
commitc08a61453b21664da3687661512e2ea208f90d98 (patch)
treeb972275919bf6c620bbbcb81dd6b12568494561e /indra
parent59f6062685efd4c52f06c526e52a9fa00ddfabeb (diff)
Port new cmake files (Trace/Meshoptimizer) to modern cmake
Diffstat (limited to 'indra')
-rw-r--r--indra/cmake/CMakeLists.txt1
-rw-r--r--indra/cmake/LLMeshOptimizer.cmake7
-rw-r--r--indra/cmake/MESHOPTIMIZER.cmake13
-rw-r--r--indra/cmake/Tracy.cmake25
-rw-r--r--indra/cmake/UI.cmake1
-rw-r--r--indra/llmeshoptimizer/CMakeLists.txt38
-rw-r--r--indra/llui/CMakeLists.txt6
-rw-r--r--indra/newview/CMakeLists.txt6
8 files changed, 35 insertions, 62 deletions
diff --git a/indra/cmake/CMakeLists.txt b/indra/cmake/CMakeLists.txt
index e592418a18..ec143d86c9 100644
--- a/indra/cmake/CMakeLists.txt
+++ b/indra/cmake/CMakeLists.txt
@@ -37,7 +37,6 @@ set(cmake_SOURCE_FILES
LLCommon.cmake
LLImage.cmake
LLKDU.cmake
- LLMeshOptimizer.cmake
LLPhysicsExtensions.cmake
LLPrimitive.cmake
LLSharedLibs.cmake
diff --git a/indra/cmake/LLMeshOptimizer.cmake b/indra/cmake/LLMeshOptimizer.cmake
deleted file mode 100644
index b79944f618..0000000000
--- a/indra/cmake/LLMeshOptimizer.cmake
+++ /dev/null
@@ -1,7 +0,0 @@
-# -*- cmake -*-
-
-set(LLMESHOPTIMIZER_INCLUDE_DIRS
- ${LIBS_OPEN_DIR}/llmeshoptimizer
- )
-
-set(LLMESHOPTIMIZER_LIBRARIES llmeshoptimizer)
diff --git a/indra/cmake/MESHOPTIMIZER.cmake b/indra/cmake/MESHOPTIMIZER.cmake
index 1c5b47b9bd..0d51f47866 100644
--- a/indra/cmake/MESHOPTIMIZER.cmake
+++ b/indra/cmake/MESHOPTIMIZER.cmake
@@ -3,14 +3,19 @@
include(Linking)
include(Prebuilt)
+include_guard()
+add_library( ll::meshoptimizer INTERFACE IMPORTED )
+
+use_conan_binary(meshoptimizer)
use_prebuilt_binary(meshoptimizer)
if (WINDOWS)
- set(MESHOPTIMIZER_LIBRARIES meshoptimizer.lib)
+ target_link_libraries( ll::meshoptimizer INTERFACE meshoptimizer.lib)
+ set(MESHOPTIMIZER_LIBRARIES )
elseif (LINUX)
- set(MESHOPTIMIZER_LIBRARIES meshoptimizer.o)
+ target_link_libraries( ll::meshoptimizer INTERFACE meshoptimizer.o)
elseif (DARWIN)
- set(MESHOPTIMIZER_LIBRARIES libmeshoptimizer.a)
+ target_link_libraries( ll::meshoptimizer INTERFACE libmeshoptimizer.a)
endif (WINDOWS)
-set(MESHOPTIMIZER_INCLUDE_DIRS ${LIBS_PREBUILT_DIR}/include/meshoptimizer)
+target_include_directories( ll::meshoptimizer SYSTEM INTERFACE ${LIBS_PREBUILT_DIR}/include/meshoptimizer)
diff --git a/indra/cmake/Tracy.cmake b/indra/cmake/Tracy.cmake
index cfff956bcf..c7563f1b7e 100644
--- a/indra/cmake/Tracy.cmake
+++ b/indra/cmake/Tracy.cmake
@@ -1,29 +1,18 @@
# -*- cmake -*-
include(Prebuilt)
+include_guard()
+add_library( ll::tracy INTERFACE IMPORTED )
+
set(USE_TRACY OFF CACHE BOOL "Use Tracy profiler.")
if (USE_TRACY)
- set(TRACY_INCLUDE_DIR ${LIBS_PREBUILT_DIR}/include/tracy)
-
-# See: indra/llcommon/llprofiler.h
- add_definitions(-DLL_PROFILER_CONFIGURATION=3)
+ use_conan_binary(tracy)
use_prebuilt_binary(tracy)
- if (WINDOWS)
- MESSAGE(STATUS "Including Tracy for Windows: '${TRACY_INCLUDE_DIR}'")
- endif (WINDOWS)
+ target_include_directories( ll::tracy SYSTEM INTERFACE ${LIBS_PREBUILT_DIR}/include/tracy)
- if (DARWIN)
- MESSAGE(STATUS "Including Tracy for Darwin: '${TRACY_INCLUDE_DIR}'")
- endif (DARWIN)
-
- if (LINUX)
- MESSAGE(STATUS "Including Tracy for Linux: '${TRACY_INCLUDE_DIR}'")
- endif (LINUX)
-else (USE_TRACY)
- # Tracy.cmake should not set LLCOMMON_INCLUDE_DIRS, let LLCommon.cmake do that
- set(TRACY_INCLUDE_DIR "")
- set(TRACY_LIBRARY "")
+# See: indra/llcommon/llprofiler.h
+ target_compile_definitions(ll::tracy INTERFACE LL_PROFILER_CONFIGURATION=3 )
endif (USE_TRACY)
diff --git a/indra/cmake/UI.cmake b/indra/cmake/UI.cmake
index 8529576fda..c02ad3e161 100644
--- a/indra/cmake/UI.cmake
+++ b/indra/cmake/UI.cmake
@@ -44,6 +44,7 @@ if( WINDOWS )
Vfw32
wer
winspool
+ imm32
)
endif()
diff --git a/indra/llmeshoptimizer/CMakeLists.txt b/indra/llmeshoptimizer/CMakeLists.txt
index 016794cfad..47cb424feb 100644
--- a/indra/llmeshoptimizer/CMakeLists.txt
+++ b/indra/llmeshoptimizer/CMakeLists.txt
@@ -8,37 +8,27 @@ include(00-Common)
include(LLCommon)
include(LLMath)
-include_directories(
- ${LLCOMMON_INCLUDE_DIRS}
- ${LLMATH_INCLUDE_DIRS}
- ${LLMESHOPTIMIZER_INCLUDE_DIR}
- ${MESHOPTIMIZER_INCLUDE_DIRS}
- ${LIBS_PREBUILT_DIR}/include #access to boost headers, needed for LLError
- )
-
set(llmeshoptimizer_SOURCE_FILES
- llmeshoptimizer.cpp
- )
+ llmeshoptimizer.cpp
+ )
set(llmeshoptimizer_HEADER_FILES
- CMakeLists.txt
-
- llmeshoptimizer.h
- )
+ CMakeLists.txt
+ llmeshoptimizer.h
+ )
set_source_files_properties(${llmeshoptimizer_HEADER_FILES}
- PROPERTIES HEADER_FILE_ONLY TRUE)
+ PROPERTIES HEADER_FILE_ONLY TRUE)
list(APPEND llmeshoptimizer_SOURCE_FILES ${llmeshoptimizer_HEADER_FILES})
-#if (USE_MESHOPT)
- add_library (llmeshoptimizer ${llmeshoptimizer_SOURCE_FILES})
+add_library (llmeshoptimizer ${llmeshoptimizer_SOURCE_FILES})
+target_include_directories( llmeshoptimizer INTERFACE ${CMAKE_CURRENT_SOURCE_DIR})
+
+target_link_libraries(llmeshoptimizer
+ llcommon
+ llmath
+ ll::meshoptimizer)
- target_link_libraries(llmeshoptimizer
- ${LLCOMMON_LIBRARIES}
- ${LLMATH_LIBRARIES}
- ${MESHOPTIMIZER_LIBRARIES})
-
- # Add tests
+# Add tests
-#endif (USE_MESHOPT)
diff --git a/indra/llui/CMakeLists.txt b/indra/llui/CMakeLists.txt
index c2c819c80e..9108c6143c 100644
--- a/indra/llui/CMakeLists.txt
+++ b/indra/llui/CMakeLists.txt
@@ -280,10 +280,6 @@ if(LL_TESTS)
if(NOT LINUX)
set(test_libs llui llmessage llcorehttp llxml llrender llcommon ll::hunspell )
- if(WINDOWS)
- LL_ADD_INTEGRATION_TEST(llurlentry llurlentry.cpp "imm32;${test_libs}")
- else(WINDOWS)
- LL_ADD_INTEGRATION_TEST(llurlentry llurlentry.cpp "${test_libs}")
- endif(WINDOWS)
+ LL_ADD_INTEGRATION_TEST(llurlentry llurlentry.cpp "${test_libs}")
endif(NOT LINUX)
endif(LL_TESTS)
diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt
index 22251d6cf8..d392e43dc6 100644
--- a/indra/newview/CMakeLists.txt
+++ b/indra/newview/CMakeLists.txt
@@ -27,7 +27,7 @@ include(LLCommon)
include(LLCoreHttp)
include(LLImage)
include(LLKDU)
-include(LLMeshOptimizer)
+include(MESHOPTIMIZER)
include(LLPhysicsExtensions)
include(LLPrimitive)
include(LLWindow)
@@ -1884,7 +1884,7 @@ target_link_libraries(${VIEWER_BINARY_NAME}
llmath
llcorehttp
llcommon
- ll::glod
+ llmeshoptimizer
ll::ndof
ll::uilibraries
lllogin
@@ -1892,7 +1892,7 @@ target_link_libraries(${VIEWER_BINARY_NAME}
llappearance
${LLPHYSICSEXTENSIONS_LIBRARIES}
ll::bugsplat
- ${TRACY_LIBRARY}
+ ll::tracy
)
if( TARGET ll::intel_memops )