summaryrefslogtreecommitdiff
path: root/indra/cmake
diff options
context:
space:
mode:
authorNicky <nicky.dasmijn@posteo.nl>2022-09-17 12:02:25 +0200
committerNicky <nicky.dasmijn@posteo.nl>2022-09-17 12:02:25 +0200
commit7a71cea15bcef59c7085657fba9ae6bdb058cc5b (patch)
treea518ac28bcf59dddea11530a2924ae22acfdd800 /indra/cmake
parent68c680599b3ee038a33bcad36ac52912725cf3cd (diff)
Workaround to keep old cmake versions limping around.
Diffstat (limited to 'indra/cmake')
-rw-r--r--indra/cmake/Linking.cmake10
1 files changed, 9 insertions, 1 deletions
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()