summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
Diffstat (limited to 'indra')
-rw-r--r--indra/CMakeLists.txt3
-rw-r--r--indra/cmake/Linking.cmake10
2 files changed, 12 insertions, 1 deletions
diff --git a/indra/CMakeLists.txt b/indra/CMakeLists.txt
index 8386953cdc..ff6a68ff97 100644
--- a/indra/CMakeLists.txt
+++ b/indra/CMakeLists.txt
@@ -7,6 +7,9 @@
## 3.13/12 is needed for add_link_options/add_compile_definitions
## 3.14 added FILE CREATE_LINK
## 3.16 is needed for target_precompile_headers
+## Nicky: Ideally we want at least 3.21 for good preset support
+## We're not there yet, but once done, there is a kludge in Linking.cmake
+# "if(${CMAKE_VERSION} VERSION_LESS "3.20.0")" that can also be removed
cmake_minimum_required(VERSION 3.16.0 FATAL_ERROR)
set(ROOT_PROJECT_NAME "SecondLife" CACHE STRING
diff --git a/indra/cmake/Linking.cmake b/indra/cmake/Linking.cmake
index 29aa6e89ea..5edb713cfa 100644
--- a/indra/cmake/Linking.cmake
+++ b/indra/cmake/Linking.cmake
@@ -8,7 +8,15 @@ set(ARCH_PREBUILT_DIRS_PLUGINS ${AUTOBUILD_INSTALL_DIR}/plugins)
set(ARCH_PREBUILT_DIRS_RELEASE ${AUTOBUILD_INSTALL_DIR}/lib/release)
set(ARCH_PREBUILT_DIRS_DEBUG ${AUTOBUILD_INSTALL_DIR}/lib/debug)
if (WINDOWS OR DARWIN )
- set(SHARED_LIB_STAGING_DIR ${CMAKE_BINARY_DIR}/sharedlibs/$<IF:$<BOOL:${LL_GENERATOR_IS_MULTI_CONFIG}>,$<CONFIG>,>)
+ # Kludge for older cmake versions, 3.20+ is needed to use a genex in add_custom_command( OUTPUT <var> ... )
+ # 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)
+ else()
+ set(SHARED_LIB_STAGING_DIR ${CMAKE_BINARY_DIR}/sharedlibs/$<IF:$<BOOL:${LL_GENERATOR_IS_MULTI_CONFIG}>,$<CONFIG>,>)
+ endif()
+
if( DARWIN )
set( SHARED_LIB_STAGING_DIR ${SHARED_LIB_STAGING_DIR}/Resources)
endif()