summaryrefslogtreecommitdiff
path: root/indra/cmake/Linking.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'indra/cmake/Linking.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()