diff options
Diffstat (limited to 'indra/cmake/Linking.cmake')
-rw-r--r-- | indra/cmake/Linking.cmake | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/indra/cmake/Linking.cmake b/indra/cmake/Linking.cmake index 3cb235a9d5..4a57a6a3ef 100644 --- a/indra/cmake/Linking.cmake +++ b/indra/cmake/Linking.cmake @@ -1,8 +1,6 @@ # -*- cmake -*- -if(NOT DEFINED ${CMAKE_CURRENT_LIST_FILE}_INCLUDED) -set(${CMAKE_CURRENT_LIST_FILE}_INCLUDED "YES") - +include_guard() include(Variables) set(ARCH_PREBUILT_DIRS ${AUTOBUILD_INSTALL_DIR}/lib) @@ -18,6 +16,11 @@ elseif (LINUX) elseif (DARWIN) set(SHARED_LIB_STAGING_DIR ${CMAKE_BINARY_DIR}/sharedlibs) set(EXE_STAGING_DIR "${CMAKE_BINARY_DIR}/sharedlibs") + if( ${CMAKE_GENERATOR} STREQUAL "Ninja") + set(EXE_STAGING_DIR "${CMAKE_BINARY_DIR}/sharedlibs/${CMAKE_BUILD_TYPE} ") + else() + set(EXE_STAGING_DIR "${CMAKE_BINARY_DIR}/sharedlibs") + endif() endif (WINDOWS) # Autobuild packages must provide 'release' versions of libraries, but may provide versions for @@ -30,7 +33,13 @@ endif (WINDOWS) if(WINDOWS OR DARWIN) # the cmake xcode and VS generators implicitly append ${CMAKE_CFG_INTDIR} to the library paths for us # fortunately both windows and darwin are case insensitive filesystems so this works. - set(AUTOBUILD_LIBS_INSTALL_DIRS "${AUTOBUILD_INSTALL_DIR}/lib/") + # Ninja on the other hand needs the the full path + if( ${CMAKE_GENERATOR} STREQUAL "Ninja") + string(TOLOWER ${CMAKE_BUILD_TYPE} CMAKE_BUILD_TYPE_LOWER) + set(AUTOBUILD_LIBS_INSTALL_DIRS ${AUTOBUILD_INSTALL_DIR}/lib/${CMAKE_BUILD_TYPE_LOWER}) + else() + set(AUTOBUILD_LIBS_INSTALL_DIRS "${AUTOBUILD_INSTALL_DIR}/lib/") + endif() else(WINDOWS OR DARWIN) # else block is for linux and any other makefile based generators string(TOLOWER ${CMAKE_BUILD_TYPE} CMAKE_BUILD_TYPE_LOWER) @@ -75,4 +84,3 @@ endif (WINDOWS) mark_as_advanced(DL_LIBRARY PTHREAD_LIBRARY WINDOWS_LIBRARIES) -endif(NOT DEFINED ${CMAKE_CURRENT_LIST_FILE}_INCLUDED) |