summaryrefslogtreecommitdiff
path: root/indra/cmake
diff options
context:
space:
mode:
Diffstat (limited to 'indra/cmake')
-rw-r--r--indra/cmake/Copy3rdPartyLibs.cmake16
-rw-r--r--indra/cmake/LLAddBuildTest.cmake4
-rw-r--r--indra/cmake/LLSharedLibs.cmake37
-rw-r--r--indra/cmake/Linking.cmake19
4 files changed, 14 insertions, 62 deletions
diff --git a/indra/cmake/Copy3rdPartyLibs.cmake b/indra/cmake/Copy3rdPartyLibs.cmake
index 829c7a180d..8e4f7bcec9 100644
--- a/indra/cmake/Copy3rdPartyLibs.cmake
+++ b/indra/cmake/Copy3rdPartyLibs.cmake
@@ -15,19 +15,17 @@ include(FMODSTUDIO)
# copy_if_different commands. Encapsulate that usage.
# Pass FROM_DIR, TARGETS and the files to copy. TO_DIR is implicit.
# to_staging_dirs diverges from copy_if_different in that it appends to TARGETS.
-MACRO(to_staging_dirs from_dir targets)
- copy_if_different("${from_dir}" "${SHARED_LIB_STAGING_DIR}/$<IF:$<BOOL:${LL_GENERATOR_IS_MULTI_CONFIG}>,$<CONFIG>,>" out_targets ${ARGN})
+macro(to_staging_dirs from_dir targets)
+ set( targetDir "${SHARED_LIB_STAGING_DIR}")
+ copy_if_different("${from_dir}" "${targetDir}" out_targets ${ARGN})
+
list(APPEND "${targets}" "${out_targets}")
-ENDMACRO(to_staging_dirs from_dir to_dir targets)
+endmacro()
###################################################################
# set up platform specific lists of files that need to be copied
###################################################################
if(WINDOWS)
- set(SHARED_LIB_STAGING_DIR_DEBUG "${SHARED_LIB_STAGING_DIR}/Debug")
- set(SHARED_LIB_STAGING_DIR_RELWITHDEBINFO "${SHARED_LIB_STAGING_DIR}/RelWithDebInfo")
- set(SHARED_LIB_STAGING_DIR_RELEASE "${SHARED_LIB_STAGING_DIR}/Release")
-
#*******************************
# VIVOX - *NOTE: no debug version
set(vivox_lib_dir "${ARCH_PREBUILT_DIRS_RELEASE}")
@@ -150,10 +148,6 @@ if(WINDOWS)
endforeach()
elseif(DARWIN)
- set(SHARED_LIB_STAGING_DIR_DEBUG "${SHARED_LIB_STAGING_DIR}/Debug/Resources")
- set(SHARED_LIB_STAGING_DIR_RELWITHDEBINFO "${SHARED_LIB_STAGING_DIR}/RelWithDebInfo/Resources")
- set(SHARED_LIB_STAGING_DIR_RELEASE "${SHARED_LIB_STAGING_DIR}/Release/Resources")
-
set(vivox_lib_dir "${ARCH_PREBUILT_DIRS_RELEASE}")
set(slvoice_files SLVoice)
set(vivox_libs
diff --git a/indra/cmake/LLAddBuildTest.cmake b/indra/cmake/LLAddBuildTest.cmake
index d3047ddc82..fa95e08dcd 100644
--- a/indra/cmake/LLAddBuildTest.cmake
+++ b/indra/cmake/LLAddBuildTest.cmake
@@ -276,12 +276,12 @@ MACRO(SET_TEST_PATH LISTVAR)
# We typically build/package only Release variants of third-party
# libraries, so append the Release staging dir in case the library being
# sought doesn't have a debug variant.
- set(${LISTVAR} ${SHARED_LIB_STAGING_DIR}/${CMAKE_CFG_INTDIR} ${SHARED_LIB_STAGING_DIR}/Release)
+ set(${LISTVAR} ${SHARED_LIB_STAGING_DIR} ${SHARED_LIB_STAGING_DIR}/Release)
ELSEIF(DARWIN)
# We typically build/package only Release variants of third-party
# libraries, so append the Release staging dir in case the library being
# sought doesn't have a debug variant.
- set(${LISTVAR} ${SHARED_LIB_STAGING_DIR}/${CMAKE_CFG_INTDIR}/Resources ${SHARED_LIB_STAGING_DIR}/Release/Resources /usr/lib)
+ set(${LISTVAR} ${SHARED_LIB_STAGING_DIR} ${SHARED_LIB_STAGING_DIR}/Release/Resources /usr/lib)
ELSE(WINDOWS)
# Linux uses a single staging directory anyway.
set(${LISTVAR} ${SHARED_LIB_STAGING_DIR} /usr/lib)
diff --git a/indra/cmake/LLSharedLibs.cmake b/indra/cmake/LLSharedLibs.cmake
index f69b45cd92..e3e2a3b0c6 100644
--- a/indra/cmake/LLSharedLibs.cmake
+++ b/indra/cmake/LLSharedLibs.cmake
@@ -37,40 +37,3 @@ macro(ll_deploy_sharedlibs_command target_exe)
endif(NOT DARWIN)
endmacro(ll_deploy_sharedlibs_command)
-
-# ll_stage_sharedlib
-# Performs config and adds a copy command for a sharedlib target.
-macro(ll_stage_sharedlib DSO_TARGET)
- # target gets written to the DLL staging directory.
- # Also this directory is shared with RunBuildTest.cmake, y'know, for the tests.
- set_target_properties(${DSO_TARGET} PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${SHARED_LIB_STAGING_DIR})
- if(NOT WINDOWS)
- get_target_property(DSO_PATH ${DSO_TARGET} LOCATION)
- get_filename_component(DSO_FILE ${DSO_PATH} NAME)
- if(DARWIN)
- set(SHARED_LIB_STAGING_DIR_CONFIG ${SHARED_LIB_STAGING_DIR}/${CMAKE_CFG_INTDIR}/Resources)
- else(DARWIN)
- set(SHARED_LIB_STAGING_DIR_CONFIG ${SHARED_LIB_STAGING_DIR}/${CMAKE_CFG_INTDIR})
- endif(DARWIN)
-
- # *TODO - maybe make this a symbolic link? -brad
- add_custom_command(
- TARGET ${DSO_TARGET} POST_BUILD
- COMMAND ${CMAKE_COMMAND}
- ARGS
- -E
- copy_if_different
- ${DSO_PATH}
- ${SHARED_LIB_STAGING_DIR_CONFIG}/${DSO_FILE}
- COMMENT "Copying llcommon to the staging folder."
- )
- endif(NOT WINDOWS)
-
- if (DARWIN)
- set_target_properties(${DSO_TARGET} PROPERTIES
- BUILD_WITH_INSTALL_RPATH 1
- INSTALL_NAME_DIR "@executable_path/../Resources"
- )
- endif(DARWIN)
-
-endmacro(ll_stage_sharedlib)
diff --git a/indra/cmake/Linking.cmake b/indra/cmake/Linking.cmake
index d0181c5122..29aa6e89ea 100644
--- a/indra/cmake/Linking.cmake
+++ b/indra/cmake/Linking.cmake
@@ -7,21 +7,16 @@ set(ARCH_PREBUILT_DIRS ${AUTOBUILD_INSTALL_DIR}/lib)
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)
- set(SHARED_LIB_STAGING_DIR ${CMAKE_BINARY_DIR}/sharedlibs)
- set(EXE_STAGING_DIR ${CMAKE_BINARY_DIR}/sharedlibs)
+if (WINDOWS OR DARWIN )
+ set(SHARED_LIB_STAGING_DIR ${CMAKE_BINARY_DIR}/sharedlibs/$<IF:$<BOOL:${LL_GENERATOR_IS_MULTI_CONFIG}>,$<CONFIG>,>)
+ if( DARWIN )
+ set( SHARED_LIB_STAGING_DIR ${SHARED_LIB_STAGING_DIR}/Resources)
+ endif()
+ set(EXE_STAGING_DIR ${CMAKE_BINARY_DIR}/sharedlibs/$<IF:$<BOOL:${LL_GENERATOR_IS_MULTI_CONFIG}>,$<CONFIG>,>)
elseif (LINUX)
set(SHARED_LIB_STAGING_DIR ${CMAKE_BINARY_DIR}/sharedlibs/lib)
set(EXE_STAGING_DIR ${CMAKE_BINARY_DIR}/sharedlibs/bin)
-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)
+endif ()
# Autobuild packages must provide 'release' versions of libraries, but may provide versions for
# specific build types. AUTOBUILD_LIBS_INSTALL_DIRS lists first the build type directory and then