From a17ca8260aa4a1e414b6a19d3faeb18f914c3f31 Mon Sep 17 00:00:00 2001 From: brad kittenbrink Date: Mon, 26 Oct 2009 16:08:43 -0400 Subject: Beginning work for DEV-41722 normalizing shared lib staging on all 3 platforms. Renamed CopyWinLibs.cmake to Copy3rdPartyLibs.cmake. --- indra/cmake/CMakeLists.txt | 2 +- indra/cmake/Copy3rdPartyLibs.cmake | 223 +++++++++++++++++++++++++++++++++++++ indra/llcommon/CMakeLists.txt | 4 +- 3 files changed, 225 insertions(+), 4 deletions(-) create mode 100644 indra/cmake/Copy3rdPartyLibs.cmake diff --git a/indra/cmake/CMakeLists.txt b/indra/cmake/CMakeLists.txt index 4563b59ad2..4fc25dcc24 100644 --- a/indra/cmake/CMakeLists.txt +++ b/indra/cmake/CMakeLists.txt @@ -16,7 +16,7 @@ set(cmake_SOURCE_FILES CARes.cmake CURL.cmake CMakeCopyIfDifferent.cmake - CopyWinLibs.cmake + Copy3rdPartyLibs.cmake CSharpMacros.cmake DBusGlib.cmake DirectX.cmake diff --git a/indra/cmake/Copy3rdPartyLibs.cmake b/indra/cmake/Copy3rdPartyLibs.cmake new file mode 100644 index 0000000000..8f27c70610 --- /dev/null +++ b/indra/cmake/Copy3rdPartyLibs.cmake @@ -0,0 +1,223 @@ +# -*- cmake -*- + +# The copy_win_libs folder contains file lists and a script used to +# copy dlls, exes and such needed to run the SecondLife from within +# VisualStudio. + +include(CMakeCopyIfDifferent) + +if(WINDOWS) +#******************************* +# VIVOX - *NOTE: no debug version +set(vivox_src_dir "${CMAKE_SOURCE_DIR}/newview/vivox-runtime/i686-win32") +set(vivox_files + SLVoice.exe + alut.dll + vivoxsdk.dll + ortp.dll + wrap_oal.dll + ) +copy_if_different( + ${vivox_src_dir} + "${SHARED_LIB_STAGING_DIR}/Debug" + out_targets + ${vivox_files} + ) +set(third_party_targets ${third_party_targets} ${out_targets}) + +copy_if_different( + ${vivox_src_dir} + "${SHARED_LIB_STAGING_DIR}/Release" + out_targets + ${vivox_files} + ) +set(third_party_targets ${third_party_targets} ${out_targets}) + +copy_if_different( + ${vivox_src_dir} + "${SHARED_LIB_STAGING_DIR}/RelWithDebInfo" + out_targets + ${vivox_files} + ) +set(third_party_targets ${third_party_targets} ${out_targets}) + +#******************************* +# Misc shared libs +set(debug_src_dir "${CMAKE_SOURCE_DIR}/../libraries/i686-win32/lib/debug") +set(debug_files + openjpegd.dll + libtcmalloc_minimal-debug.dll + libapr-1.dll + libaprutil-1.dll + libapriconv-1.dll + ) +if (FMOD_SDK_DIR) + set(fmod_files fmod.dll) + copy_if_different( + ${FMOD_SDK_DIR} + "${CMAKE_CURRENT_BINARY_DIR}/Debug" + out_targets + ${fmod_files} + ) + set(all_targets ${all_targets} ${out_targets}) + copy_if_different( + ${FMOD_SDK_DIR} + "${CMAKE_CURRENT_BINARY_DIR}/Release" + out_targets + ${fmod_files} + ) + set(all_targets ${all_targets} ${out_targets}) + copy_if_different( + ${FMOD_SDK_DIR} + "${CMAKE_CURRENT_BINARY_DIR}/RelWithDbgInfo" + out_targets + ${fmod_files} + ) + set(all_targets ${all_targets} ${out_targets}) +endif (FMOD_SDK_DIR) + +copy_if_different( + ${debug_src_dir} + "${SHARED_LIB_STAGING_DIR}/Debug" + out_targets + ${debug_files} + ) +set(third_party_targets ${third_party_targets} ${out_targets}) + +set(release_src_dir "${CMAKE_SOURCE_DIR}/../libraries/i686-win32/lib/release") +set(release_files + openjpeg.dll + libtcmalloc_minimal.dll + libapr-1.dll + libaprutil-1.dll + libapriconv-1.dll + ) + +copy_if_different( + ${release_src_dir} + "${SHARED_LIB_STAGING_DIR}/Release" + out_targets + ${release_files} + ) +set(third_party_targets ${third_party_targets} ${out_targets}) + +copy_if_different( + ${release_src_dir} + "${SHARED_LIB_STAGING_DIR}/RelWithDebInfo" + out_targets + ${release_files} + ) +set(third_party_targets ${third_party_targets} ${out_targets}) + +#******************************* +# LLKDU +set(internal_llkdu_path "${CMAKE_SOURCE_DIR}/llkdu") +if(NOT EXISTS ${internal_llkdu_path}) + if (EXISTS "${debug_src_dir}/llkdu.dll") + set(debug_llkdu_src "${debug_src_dir}/llkdu.dll") + set(debug_llkdu_dst "${SHARED_LIB_STAGING_DIR}/Debug/llkdu.dll") + ADD_CUSTOM_COMMAND( + OUTPUT ${debug_llkdu_dst} + COMMAND ${CMAKE_COMMAND} -E copy_if_different ${debug_llkdu_src} ${debug_llkdu_dst} + DEPENDS ${debug_llkdu_src} + COMMENT "Copying llkdu.dll ${SHARED_LIB_STAGING_DIR}/Debug" + ) + set(third_party_targets ${third_party_targets} $} ${debug_llkdu_dst}) + endif (EXISTS "${debug_src_dir}/llkdu.dll") + + if (EXISTS "${release_src_dir}/llkdu.dll") + set(release_llkdu_src "${release_src_dir}/llkdu.dll") + set(release_llkdu_dst "${SHARED_LIB_STAGING_DIR}/Release/llkdu.dll") + ADD_CUSTOM_COMMAND( + OUTPUT ${release_llkdu_dst} + COMMAND ${CMAKE_COMMAND} -E copy_if_different ${release_llkdu_src} ${release_llkdu_dst} + DEPENDS ${release_llkdu_src} + COMMENT "Copying llkdu.dll ${SHARED_LIB_STAGING_DIR}/Release" + ) + set(third_party_targets ${third_party_targets} ${release_llkdu_dst}) + + set(relwithdebinfo_llkdu_dst "${SHARED_LIB_STAGING_DIR}/RelWithDebInfo/llkdu.dll") + ADD_CUSTOM_COMMAND( + OUTPUT ${relwithdebinfo_llkdu_dst} + COMMAND ${CMAKE_COMMAND} -E copy_if_different ${release_llkdu_src} ${relwithdebinfo_llkdu_dst} + DEPENDS ${release_llkdu_src} + COMMENT "Copying llkdu.dll ${SHARED_LIB_STAGING_DIR}/RelWithDebInfo" + ) + set(third_party_targets ${third_party_targets} ${relwithdebinfo_llkdu_dst}) + endif (EXISTS "${release_src_dir}/llkdu.dll") + +endif (NOT EXISTS ${internal_llkdu_path}) + +#******************************* +# Copy MS C runtime dlls, required for packaging. +# *TODO - Adapt this to support VC9 +if (MSVC80) + FIND_PATH(debug_msvc8_redist_path msvcr80d.dll + PATHS + [HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\8.0\\Setup\\VC;ProductDir]/redist/Debug_NonRedist/x86/Microsoft.VC80.DebugCRT + NO_DEFAULT_PATH + NO_DEFAULT_PATH + ) + + if(EXISTS ${debug_msvc8_redist_path}) + set(debug_msvc8_files + msvcr80d.dll + msvcp80d.dll + Microsoft.VC80.DebugCRT.manifest + ) + + copy_if_different( + ${debug_msvc8_redist_path} + "${SHARED_LIB_STAGING_DIR}/Debug" + out_targets + ${debug_msvc8_files} + ) + set(third_party_targets ${third_party_targets} ${out_targets}) + + endif (EXISTS ${debug_msvc8_redist_path}) + + FIND_PATH(release_msvc8_redist_path msvcr80.dll + PATHS + [HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\8.0\\Setup\\VC;ProductDir]/redist/x86/Microsoft.VC80.CRT + NO_DEFAULT_PATH + NO_DEFAULT_PATH + ) + + if(EXISTS ${release_msvc8_redist_path}) + set(release_msvc8_files + msvcr80.dll + msvcp80.dll + Microsoft.VC80.CRT.manifest + ) + + copy_if_different( + ${release_msvc8_redist_path} + "${SHARED_LIB_STAGING_DIR}/Release" + out_targets + ${release_msvc8_files} + ) + set(third_party_targets ${third_party_targets} ${out_targets}) + + copy_if_different( + ${release_msvc8_redist_path} + "${SHARED_LIB_STAGING_DIR}/RelWithDebInfo" + out_targets + ${release_msvc8_files} + ) + set(third_party_targets ${third_party_targets} ${out_targets}) + + endif (EXISTS ${release_msvc8_redist_path}) +endif (MSVC80) + +elseif(DARWIN) + +elseif(LINUX) + +else(WINDOWS) + message(STATUS "WARNING: unrecognized platform for staging 3rd party libs, skipping...") +endif(WINDOWS) + +add_custom_target(stage_third_party_libs ALL + DEPENDS + ${third_party_targets} + ) diff --git a/indra/llcommon/CMakeLists.txt b/indra/llcommon/CMakeLists.txt index e7aaf3c984..7a7281a4a7 100644 --- a/indra/llcommon/CMakeLists.txt +++ b/indra/llcommon/CMakeLists.txt @@ -8,9 +8,7 @@ include(Linking) include(Boost) include (Pth) -if (WINDOWS) - include(CopyWinLibs) -endif (WINDOWS) +include(Copy3rdPartyLibs) include_directories( ${EXPAT_INCLUDE_DIRS} -- cgit v1.2.3 From 89e3523052a9b1ac5534e3e30fa312ef11a78f69 Mon Sep 17 00:00:00 2001 From: brad kittenbrink Date: Mon, 26 Oct 2009 18:13:20 -0400 Subject: More work for DEV-41722 normalizing shared lib staging on all 3 platforms. Started refactoring Copy3rdPartyLibs.cmake to use common commands with platform specific variables. --- indra/cmake/Copy3rdPartyLibs.cmake | 177 +++++++++++++++++++++++-------------- 1 file changed, 111 insertions(+), 66 deletions(-) diff --git a/indra/cmake/Copy3rdPartyLibs.cmake b/indra/cmake/Copy3rdPartyLibs.cmake index 8f27c70610..cb8ed4f05f 100644 --- a/indra/cmake/Copy3rdPartyLibs.cmake +++ b/indra/cmake/Copy3rdPartyLibs.cmake @@ -7,6 +7,10 @@ include(CMakeCopyIfDifferent) 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_src_dir "${CMAKE_SOURCE_DIR}/newview/vivox-runtime/i686-win32") @@ -17,32 +21,11 @@ set(vivox_files ortp.dll wrap_oal.dll ) -copy_if_different( - ${vivox_src_dir} - "${SHARED_LIB_STAGING_DIR}/Debug" - out_targets - ${vivox_files} - ) -set(third_party_targets ${third_party_targets} ${out_targets}) - -copy_if_different( - ${vivox_src_dir} - "${SHARED_LIB_STAGING_DIR}/Release" - out_targets - ${vivox_files} - ) -set(third_party_targets ${third_party_targets} ${out_targets}) - -copy_if_different( - ${vivox_src_dir} - "${SHARED_LIB_STAGING_DIR}/RelWithDebInfo" - out_targets - ${vivox_files} - ) -set(third_party_targets ${third_party_targets} ${out_targets}) #******************************* # Misc shared libs + +# *TODO - update this to use LIBS_PREBUILT_DIR and LL_ARCH_DIR variables set(debug_src_dir "${CMAKE_SOURCE_DIR}/../libraries/i686-win32/lib/debug") set(debug_files openjpegd.dll @@ -51,6 +34,17 @@ set(debug_files libaprutil-1.dll libapriconv-1.dll ) + +# *TODO - update this to use LIBS_PREBUILT_DIR and LL_ARCH_DIR variables +set(release_src_dir "${CMAKE_SOURCE_DIR}/../libraries/i686-win32/lib/release") +set(release_files + openjpeg.dll + libtcmalloc_minimal.dll + libapr-1.dll + libaprutil-1.dll + libapriconv-1.dll + ) + if (FMOD_SDK_DIR) set(fmod_files fmod.dll) copy_if_different( @@ -76,38 +70,6 @@ if (FMOD_SDK_DIR) set(all_targets ${all_targets} ${out_targets}) endif (FMOD_SDK_DIR) -copy_if_different( - ${debug_src_dir} - "${SHARED_LIB_STAGING_DIR}/Debug" - out_targets - ${debug_files} - ) -set(third_party_targets ${third_party_targets} ${out_targets}) - -set(release_src_dir "${CMAKE_SOURCE_DIR}/../libraries/i686-win32/lib/release") -set(release_files - openjpeg.dll - libtcmalloc_minimal.dll - libapr-1.dll - libaprutil-1.dll - libapriconv-1.dll - ) - -copy_if_different( - ${release_src_dir} - "${SHARED_LIB_STAGING_DIR}/Release" - out_targets - ${release_files} - ) -set(third_party_targets ${third_party_targets} ${out_targets}) - -copy_if_different( - ${release_src_dir} - "${SHARED_LIB_STAGING_DIR}/RelWithDebInfo" - out_targets - ${release_files} - ) -set(third_party_targets ${third_party_targets} ${out_targets}) #******************************* # LLKDU @@ -115,33 +77,33 @@ set(internal_llkdu_path "${CMAKE_SOURCE_DIR}/llkdu") if(NOT EXISTS ${internal_llkdu_path}) if (EXISTS "${debug_src_dir}/llkdu.dll") set(debug_llkdu_src "${debug_src_dir}/llkdu.dll") - set(debug_llkdu_dst "${SHARED_LIB_STAGING_DIR}/Debug/llkdu.dll") + set(debug_llkdu_dst "${SHARED_LIB_STAGING_DIR_DEBUG}/llkdu.dll") ADD_CUSTOM_COMMAND( OUTPUT ${debug_llkdu_dst} COMMAND ${CMAKE_COMMAND} -E copy_if_different ${debug_llkdu_src} ${debug_llkdu_dst} DEPENDS ${debug_llkdu_src} - COMMENT "Copying llkdu.dll ${SHARED_LIB_STAGING_DIR}/Debug" + COMMENT "Copying llkdu.dll ${SHARED_LIB_STAGING_DIR_DEBUG}" ) set(third_party_targets ${third_party_targets} $} ${debug_llkdu_dst}) endif (EXISTS "${debug_src_dir}/llkdu.dll") if (EXISTS "${release_src_dir}/llkdu.dll") set(release_llkdu_src "${release_src_dir}/llkdu.dll") - set(release_llkdu_dst "${SHARED_LIB_STAGING_DIR}/Release/llkdu.dll") + set(release_llkdu_dst "${SHARED_LIB_STAGING_DIR_RELEASE}/llkdu.dll") ADD_CUSTOM_COMMAND( OUTPUT ${release_llkdu_dst} COMMAND ${CMAKE_COMMAND} -E copy_if_different ${release_llkdu_src} ${release_llkdu_dst} DEPENDS ${release_llkdu_src} - COMMENT "Copying llkdu.dll ${SHARED_LIB_STAGING_DIR}/Release" + COMMENT "Copying llkdu.dll ${SHARED_LIB_STAGING_DIR_RELEASE}" ) set(third_party_targets ${third_party_targets} ${release_llkdu_dst}) - set(relwithdebinfo_llkdu_dst "${SHARED_LIB_STAGING_DIR}/RelWithDebInfo/llkdu.dll") + set(relwithdebinfo_llkdu_dst "${SHARED_LIB_STAGING_DIR_RELWITHDEBINFO}/llkdu.dll") ADD_CUSTOM_COMMAND( OUTPUT ${relwithdebinfo_llkdu_dst} COMMAND ${CMAKE_COMMAND} -E copy_if_different ${release_llkdu_src} ${relwithdebinfo_llkdu_dst} DEPENDS ${release_llkdu_src} - COMMENT "Copying llkdu.dll ${SHARED_LIB_STAGING_DIR}/RelWithDebInfo" + COMMENT "Copying llkdu.dll ${SHARED_LIB_STAGING_DIR_RELWITHDEBINFO}" ) set(third_party_targets ${third_party_targets} ${relwithdebinfo_llkdu_dst}) endif (EXISTS "${release_src_dir}/llkdu.dll") @@ -168,7 +130,7 @@ if (MSVC80) copy_if_different( ${debug_msvc8_redist_path} - "${SHARED_LIB_STAGING_DIR}/Debug" + "${SHARED_LIB_STAGING_DIR_DEBUG}" out_targets ${debug_msvc8_files} ) @@ -192,7 +154,7 @@ if (MSVC80) copy_if_different( ${release_msvc8_redist_path} - "${SHARED_LIB_STAGING_DIR}/Release" + "${SHARED_LIB_STAGING_DIR_RELEASE}" out_targets ${release_msvc8_files} ) @@ -200,7 +162,7 @@ if (MSVC80) copy_if_different( ${release_msvc8_redist_path} - "${SHARED_LIB_STAGING_DIR}/RelWithDebInfo" + "${SHARED_LIB_STAGING_DIR_RELWITHDEBINFO}" out_targets ${release_msvc8_files} ) @@ -210,13 +172,96 @@ if (MSVC80) endif (MSVC80) elseif(DARWIN) - + set(vivox_src_dir "${CMAKE_SOURCE_DIR}/newview/vivox-runtime/universal-darwin") + set(vivox_files + ) + # *TODO - update this to use LIBS_PREBUILT_DIR and LL_ARCH_DIR variables + set(debug_src_dir "${CMAKE_SOURCE_DIR}/../libraries/universal-darwin/lib/debug") + set(debug_files + ) + # *TODO - update this to use LIBS_PREBUILT_DIR and LL_ARCH_DIR variables + set(release_src_dir "${CMAKE_SOURCE_DIR}/../libraries/universal-darwin/lib/release") + set(release_files + ) elseif(LINUX) - + set(vivox_src_dir "${CMAKE_SOURCE_DIR}/newview/vivox-runtime/i686-linux") + set(vivox_files + ) + # *TODO - update this to use LIBS_PREBUILT_DIR and LL_ARCH_DIR variables + set(debug_src_dir "${CMAKE_SOURCE_DIR}/../libraries/i686-linux/lib/debug") + set(debug_files + ) + # *TODO - update this to use LIBS_PREBUILT_DIR and LL_ARCH_DIR variables + set(release_src_dir "${CMAKE_SOURCE_DIR}/../libraries/i686-linux/lib/release") + set(release_files + ) else(WINDOWS) message(STATUS "WARNING: unrecognized platform for staging 3rd party libs, skipping...") + set(vivox_src_dir "${CMAKE_SOURCE_DIR}/newview/vivox-runtime/i686-linux") + set(vivox_files + ) + # *TODO - update this to use LIBS_PREBUILT_DIR and LL_ARCH_DIR variables + set(debug_src_dir "${CMAKE_SOURCE_DIR}/../libraries/i686-linux/lib/debug") + set(debug_files + ) + # *TODO - update this to use LIBS_PREBUILT_DIR and LL_ARCH_DIR variables + set(release_src_dir "${CMAKE_SOURCE_DIR}/../libraries/i686-linux/lib/release") + set(release_files + ) endif(WINDOWS) + +copy_if_different( + ${vivox_src_dir} + "${SHARED_LIB_STAGING_DIR_DEBUG}" + out_targets + ${vivox_files} + ) +set(third_party_targets ${third_party_targets} ${out_targets}) + +copy_if_different( + ${vivox_src_dir} + "${SHARED_LIB_STAGING_DIR_RELEASE}" + out_targets + ${vivox_files} + ) +set(third_party_targets ${third_party_targets} ${out_targets}) + +copy_if_different( + ${vivox_src_dir} + "${SHARED_LIB_STAGING_DIR_RELWITHDEBINFO}" + out_targets + ${vivox_files} + ) +set(third_party_targets ${third_party_targets} ${out_targets}) + + + +copy_if_different( + ${debug_src_dir} + "${SHARED_LIB_STAGING_DIR_DEBUG}" + out_targets + ${debug_files} + ) +set(third_party_targets ${third_party_targets} ${out_targets}) + +copy_if_different( + ${release_src_dir} + "${SHARED_LIB_STAGING_DIR_RELEASE}" + out_targets + ${release_files} + ) +set(third_party_targets ${third_party_targets} ${out_targets}) + +copy_if_different( + ${release_src_dir} + "${SHARED_LIB_STAGING_DIR_RELWITHDEBINFO}" + out_targets + ${release_files} + ) +set(third_party_targets ${third_party_targets} ${out_targets}) + + add_custom_target(stage_third_party_libs ALL DEPENDS ${third_party_targets} -- cgit v1.2.3 From cddf7f19c5741272f4d1cc2b124ff77f11b873a6 Mon Sep 17 00:00:00 2001 From: brad kittenbrink Date: Fri, 30 Oct 2009 18:14:58 -0400 Subject: continuing work on DEV-41722 normalizing shared lib staging. started factoring out copying into common section while file lists are initialized above in platform specific sections. --- indra/cmake/Copy3rdPartyLibs.cmake | 254 ++++++++++++++++++++++--------------- 1 file changed, 155 insertions(+), 99 deletions(-) diff --git a/indra/cmake/Copy3rdPartyLibs.cmake b/indra/cmake/Copy3rdPartyLibs.cmake index cb8ed4f05f..5f9d386a4f 100644 --- a/indra/cmake/Copy3rdPartyLibs.cmake +++ b/indra/cmake/Copy3rdPartyLibs.cmake @@ -11,104 +11,59 @@ if(WINDOWS) 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_src_dir "${CMAKE_SOURCE_DIR}/newview/vivox-runtime/i686-win32") -set(vivox_files - SLVoice.exe - alut.dll - vivoxsdk.dll - ortp.dll - wrap_oal.dll - ) - -#******************************* -# Misc shared libs - -# *TODO - update this to use LIBS_PREBUILT_DIR and LL_ARCH_DIR variables -set(debug_src_dir "${CMAKE_SOURCE_DIR}/../libraries/i686-win32/lib/debug") -set(debug_files - openjpegd.dll - libtcmalloc_minimal-debug.dll - libapr-1.dll - libaprutil-1.dll - libapriconv-1.dll - ) - -# *TODO - update this to use LIBS_PREBUILT_DIR and LL_ARCH_DIR variables -set(release_src_dir "${CMAKE_SOURCE_DIR}/../libraries/i686-win32/lib/release") -set(release_files - openjpeg.dll - libtcmalloc_minimal.dll - libapr-1.dll - libaprutil-1.dll - libapriconv-1.dll - ) - -if (FMOD_SDK_DIR) - set(fmod_files fmod.dll) - copy_if_different( - ${FMOD_SDK_DIR} - "${CMAKE_CURRENT_BINARY_DIR}/Debug" - out_targets - ${fmod_files} - ) - set(all_targets ${all_targets} ${out_targets}) - copy_if_different( - ${FMOD_SDK_DIR} - "${CMAKE_CURRENT_BINARY_DIR}/Release" - out_targets - ${fmod_files} - ) - set(all_targets ${all_targets} ${out_targets}) - copy_if_different( - ${FMOD_SDK_DIR} - "${CMAKE_CURRENT_BINARY_DIR}/RelWithDbgInfo" - out_targets - ${fmod_files} + #******************************* + # VIVOX - *NOTE: no debug version + set(vivox_src_dir "${CMAKE_SOURCE_DIR}/newview/vivox-runtime/i686-win32") + set(vivox_files + SLVoice.exe + alut.dll + vivoxsdk.dll + ortp.dll + wrap_oal.dll ) - set(all_targets ${all_targets} ${out_targets}) -endif (FMOD_SDK_DIR) - -#******************************* -# LLKDU -set(internal_llkdu_path "${CMAKE_SOURCE_DIR}/llkdu") -if(NOT EXISTS ${internal_llkdu_path}) - if (EXISTS "${debug_src_dir}/llkdu.dll") - set(debug_llkdu_src "${debug_src_dir}/llkdu.dll") - set(debug_llkdu_dst "${SHARED_LIB_STAGING_DIR_DEBUG}/llkdu.dll") - ADD_CUSTOM_COMMAND( - OUTPUT ${debug_llkdu_dst} - COMMAND ${CMAKE_COMMAND} -E copy_if_different ${debug_llkdu_src} ${debug_llkdu_dst} - DEPENDS ${debug_llkdu_src} - COMMENT "Copying llkdu.dll ${SHARED_LIB_STAGING_DIR_DEBUG}" - ) - set(third_party_targets ${third_party_targets} $} ${debug_llkdu_dst}) - endif (EXISTS "${debug_src_dir}/llkdu.dll") + #******************************* + # Misc shared libs - if (EXISTS "${release_src_dir}/llkdu.dll") - set(release_llkdu_src "${release_src_dir}/llkdu.dll") - set(release_llkdu_dst "${SHARED_LIB_STAGING_DIR_RELEASE}/llkdu.dll") - ADD_CUSTOM_COMMAND( - OUTPUT ${release_llkdu_dst} - COMMAND ${CMAKE_COMMAND} -E copy_if_different ${release_llkdu_src} ${release_llkdu_dst} - DEPENDS ${release_llkdu_src} - COMMENT "Copying llkdu.dll ${SHARED_LIB_STAGING_DIR_RELEASE}" - ) - set(third_party_targets ${third_party_targets} ${release_llkdu_dst}) + # *TODO - update this to use LIBS_PREBUILT_DIR and LL_ARCH_DIR variables + set(debug_src_dir "${CMAKE_SOURCE_DIR}/../libraries/i686-win32/lib/debug") + set(debug_files + openjpegd.dll + libtcmalloc_minimal-debug.dll + libapr-1.dll + libaprutil-1.dll + libapriconv-1.dll + ) - set(relwithdebinfo_llkdu_dst "${SHARED_LIB_STAGING_DIR_RELWITHDEBINFO}/llkdu.dll") - ADD_CUSTOM_COMMAND( - OUTPUT ${relwithdebinfo_llkdu_dst} - COMMAND ${CMAKE_COMMAND} -E copy_if_different ${release_llkdu_src} ${relwithdebinfo_llkdu_dst} - DEPENDS ${release_llkdu_src} - COMMENT "Copying llkdu.dll ${SHARED_LIB_STAGING_DIR_RELWITHDEBINFO}" - ) - set(third_party_targets ${third_party_targets} ${relwithdebinfo_llkdu_dst}) - endif (EXISTS "${release_src_dir}/llkdu.dll") + # *TODO - update this to use LIBS_PREBUILT_DIR and LL_ARCH_DIR variables + set(release_src_dir "${CMAKE_SOURCE_DIR}/../libraries/i686-win32/lib/release") + set(release_files + openjpeg.dll + libtcmalloc_minimal.dll + libapr-1.dll + libaprutil-1.dll + libapriconv-1.dll + ) -endif (NOT EXISTS ${internal_llkdu_path}) + if (FMOD_SDK_DIR) + set(fmod_files fmod.dll) + endif (FMOD_SDK_DIR) + + #******************************* + # LLKDU + set(internal_llkdu_path "${CMAKE_SOURCE_DIR}/llkdu") + if(NOT EXISTS ${internal_llkdu_path}) + if (EXISTS "${debug_src_dir}/llkdu.dll") + set(debug_llkdu_src "${debug_src_dir}/llkdu.dll") + set(debug_llkdu_dst "${SHARED_LIB_STAGING_DIR_DEBUG}/llkdu.dll") + endif (EXISTS "${debug_src_dir}/llkdu.dll") + + if (EXISTS "${release_src_dir}/llkdu.dll") + set(release_llkdu_src "${release_src_dir}/llkdu.dll") + set(release_llkdu_dst "${SHARED_LIB_STAGING_DIR_RELEASE}/llkdu.dll") + set(relwithdebinfo_llkdu_dst "${SHARED_LIB_STAGING_DIR_RELWITHDEBINFO}/llkdu.dll") + endif (EXISTS "${release_src_dir}/llkdu.dll") + endif (NOT EXISTS ${internal_llkdu_path}) #******************************* # Copy MS C runtime dlls, required for packaging. @@ -183,6 +138,25 @@ elseif(DARWIN) set(release_src_dir "${CMAKE_SOURCE_DIR}/../libraries/universal-darwin/lib/release") set(release_files ) + + # fmod is statically linked on darwin + set(fmod_files "") + + #******************************* + # LLKDU + set(internal_llkdu_path "${CMAKE_SOURCE_DIR}/llkdu") + if(NOT EXISTS ${internal_llkdu_path}) + if (EXISTS "${debug_src_dir}/libllkdu.dylib") + set(debug_llkdu_src "${debug_src_dir}/libllkdu.dylib") + set(debug_llkdu_dst "${SHARED_LIB_STAGING_DIR_DEBUG}/libllkdu.dylib") + endif (EXISTS "${debug_src_dir}/libllkdu.dylib") + + if (EXISTS "${release_src_dir}/libllkdu.dylib") + set(release_llkdu_src "${release_src_dir}/libllkdu.dylib") + set(release_llkdu_dst "${SHARED_LIB_STAGING_DIR_RELEASE}/libllkdu.dylib") + set(relwithdebinfo_llkdu_dst "${SHARED_LIB_STAGING_DIR_RELWITHDEBINFO}/libllkdu.dylib") + endif (EXISTS "${release_src_dir}/libllkdu.dylib") + endif (NOT EXISTS ${internal_llkdu_path}) elseif(LINUX) set(vivox_src_dir "${CMAKE_SOURCE_DIR}/newview/vivox-runtime/i686-linux") set(vivox_files @@ -195,19 +169,43 @@ elseif(LINUX) set(release_src_dir "${CMAKE_SOURCE_DIR}/../libraries/i686-linux/lib/release") set(release_files ) + + if (FMOD_SDK_DIR) + set(fmod_files "libfmod-3.75.so") + endif (FMOD_SDK_DIR) + + #******************************* + # LLKDU + set(internal_llkdu_path "${CMAKE_SOURCE_DIR}/llkdu") + if(NOT EXISTS ${internal_llkdu_path}) + if (EXISTS "${debug_src_dir}/libllkdu.so") + set(debug_llkdu_src "${debug_src_dir}/libllkdu.so") + set(debug_llkdu_dst "${SHARED_LIB_STAGING_DIR_DEBUG}/libllkdu.so") + endif (EXISTS "${debug_src_dir}/libllkdu.so") + + if (EXISTS "${release_src_dir}/libllkdu.so") + set(release_llkdu_src "${release_src_dir}/libllkdu.so") + set(release_llkdu_dst "${SHARED_LIB_STAGING_DIR_RELEASE}/libllkdu.so") + set(relwithdebinfo_llkdu_dst "${SHARED_LIB_STAGING_DIR_RELWITHDEBINFO}/libllkdu.so") + endif (EXISTS "${release_src_dir}/libllkdu.so") else(WINDOWS) message(STATUS "WARNING: unrecognized platform for staging 3rd party libs, skipping...") set(vivox_src_dir "${CMAKE_SOURCE_DIR}/newview/vivox-runtime/i686-linux") - set(vivox_files - ) + set(vivox_files "") # *TODO - update this to use LIBS_PREBUILT_DIR and LL_ARCH_DIR variables set(debug_src_dir "${CMAKE_SOURCE_DIR}/../libraries/i686-linux/lib/debug") - set(debug_files - ) + set(debug_files "") # *TODO - update this to use LIBS_PREBUILT_DIR and LL_ARCH_DIR variables set(release_src_dir "${CMAKE_SOURCE_DIR}/../libraries/i686-linux/lib/release") - set(release_files - ) + set(release_files "") + + set(fmod_files "") + + set(debug_llkdu_src "") + set(debug_llkdu_dst "") + set(release_llkdu_src "") + set(release_llkdu_dst "") + set(relwithdebinfo_llkdu_dst "") endif(WINDOWS) @@ -261,6 +259,64 @@ copy_if_different( ) set(third_party_targets ${third_party_targets} ${out_targets}) +if (FMOD_SDK_DIR) + copy_if_different( + ${FMOD_SDK_DIR} + "${CMAKE_CURRENT_BINARY_DIR}/Debug" + out_targets + ${fmod_files} + ) + set(all_targets ${all_targets} ${out_targets}) + copy_if_different( + ${FMOD_SDK_DIR} + "${CMAKE_CURRENT_BINARY_DIR}/Release" + out_targets + ${fmod_files} + ) + set(all_targets ${all_targets} ${out_targets}) + copy_if_different( + ${FMOD_SDK_DIR} + "${CMAKE_CURRENT_BINARY_DIR}/RelWithDbgInfo" + out_targets + ${fmod_files} + ) + set(all_targets ${all_targets} ${out_targets}) +endif (FMOD_SDK_DIR) + +#******************************* +# LLKDU +set(internal_llkdu_path "${CMAKE_SOURCE_DIR}/llkdu") +if(NOT EXISTS ${internal_llkdu_path}) + if (EXISTS "${debug_llkdu_src}") + ADD_CUSTOM_COMMAND( + OUTPUT ${debug_llkdu_dst} + COMMAND ${CMAKE_COMMAND} -E copy_if_different ${debug_llkdu_src} ${debug_llkdu_dst} + DEPENDS ${debug_llkdu_src} + COMMENT "Copying llkdu.dll ${SHARED_LIB_STAGING_DIR_DEBUG}" + ) + set(third_party_targets ${third_party_targets} $} ${debug_llkdu_dst}) + endif (EXISTS "${debug_llkdu_src}") + + if (EXISTS "${release_llkdu_src}") + ADD_CUSTOM_COMMAND( + OUTPUT ${release_llkdu_dst} + COMMAND ${CMAKE_COMMAND} -E copy_if_different ${release_llkdu_src} ${release_llkdu_dst} + DEPENDS ${release_llkdu_src} + COMMENT "Copying llkdu.dll ${SHARED_LIB_STAGING_DIR_RELEASE}" + ) + set(third_party_targets ${third_party_targets} ${release_llkdu_dst}) + + ADD_CUSTOM_COMMAND( + OUTPUT ${relwithdebinfo_llkdu_dst} + COMMAND ${CMAKE_COMMAND} -E copy_if_different ${release_llkdu_src} ${relwithdebinfo_llkdu_dst} + DEPENDS ${release_llkdu_src} + COMMENT "Copying llkdu.dll ${SHARED_LIB_STAGING_DIR_RELWITHDEBINFO}" + ) + set(third_party_targets ${third_party_targets} ${relwithdebinfo_llkdu_dst}) + endif (EXISTS "${release_llkdu_src}") + +endif (NOT EXISTS ${internal_llkdu_path}) + add_custom_target(stage_third_party_libs ALL DEPENDS -- cgit v1.2.3 From f3d13666f611c92fe175d14b3d6bb89f5841845d Mon Sep 17 00:00:00 2001 From: brad kittenbrink Date: Fri, 30 Oct 2009 18:21:35 -0400 Subject: continuing work on DEV-41722 normalizing shared lib staging. fixed copy/paste error in the last commit(f5da14574943). --- indra/cmake/Copy3rdPartyLibs.cmake | 1 + 1 file changed, 1 insertion(+) diff --git a/indra/cmake/Copy3rdPartyLibs.cmake b/indra/cmake/Copy3rdPartyLibs.cmake index 5f9d386a4f..e7b5d097d3 100644 --- a/indra/cmake/Copy3rdPartyLibs.cmake +++ b/indra/cmake/Copy3rdPartyLibs.cmake @@ -188,6 +188,7 @@ elseif(LINUX) set(release_llkdu_dst "${SHARED_LIB_STAGING_DIR_RELEASE}/libllkdu.so") set(relwithdebinfo_llkdu_dst "${SHARED_LIB_STAGING_DIR_RELWITHDEBINFO}/libllkdu.so") endif (EXISTS "${release_src_dir}/libllkdu.so") + endif(NOT EXISTS ${internal_llkdu_path}) else(WINDOWS) message(STATUS "WARNING: unrecognized platform for staging 3rd party libs, skipping...") set(vivox_src_dir "${CMAKE_SOURCE_DIR}/newview/vivox-runtime/i686-linux") -- cgit v1.2.3 From 35469b04a0cc9225788c71f341a7d44937d880e8 Mon Sep 17 00:00:00 2001 From: brad kittenbrink Date: Mon, 2 Nov 2009 13:52:44 -0500 Subject: Implemented mac staging for DEV-41722 normalizing shared lib staging. also added a bunch of comments. --- indra/cmake/Copy3rdPartyLibs.cmake | 38 ++++++++++++++++++++++++++++++++++++-- 1 file changed, 36 insertions(+), 2 deletions(-) diff --git a/indra/cmake/Copy3rdPartyLibs.cmake b/indra/cmake/Copy3rdPartyLibs.cmake index e7b5d097d3..9eb19b3547 100644 --- a/indra/cmake/Copy3rdPartyLibs.cmake +++ b/indra/cmake/Copy3rdPartyLibs.cmake @@ -6,6 +6,9 @@ include(CMakeCopyIfDifferent) +################################################################### +# 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") @@ -26,6 +29,7 @@ if(WINDOWS) # Misc shared libs # *TODO - update this to use LIBS_PREBUILT_DIR and LL_ARCH_DIR variables + # or ARCH_PREBUILT_DIRS set(debug_src_dir "${CMAKE_SOURCE_DIR}/../libraries/i686-win32/lib/debug") set(debug_files openjpegd.dll @@ -36,6 +40,7 @@ if(WINDOWS) ) # *TODO - update this to use LIBS_PREBUILT_DIR and LL_ARCH_DIR variables + # or ARCH_PREBUILT_DIRS set(release_src_dir "${CMAKE_SOURCE_DIR}/../libraries/i686-win32/lib/release") set(release_files openjpeg.dll @@ -127,16 +132,37 @@ if (MSVC80) endif (MSVC80) elseif(DARWIN) + 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") + set(vivox_src_dir "${CMAKE_SOURCE_DIR}/newview/vivox-runtime/universal-darwin") set(vivox_files + SLVoice + libalut.dylib + libopenal.dylib + libortp.dylib + libvivoxsdk.dylib ) # *TODO - update this to use LIBS_PREBUILT_DIR and LL_ARCH_DIR variables - set(debug_src_dir "${CMAKE_SOURCE_DIR}/../libraries/universal-darwin/lib/debug") + # or ARCH_PREBUILT_DIRS + set(debug_src_dir "${CMAKE_SOURCE_DIR}/../libraries/universal-darwin/lib_debug") set(debug_files ) # *TODO - update this to use LIBS_PREBUILT_DIR and LL_ARCH_DIR variables - set(release_src_dir "${CMAKE_SOURCE_DIR}/../libraries/universal-darwin/lib/release") + # or ARCH_PREBUILT_DIRS + set(release_src_dir "${CMAKE_SOURCE_DIR}/../libraries/universal-darwin/lib_release") set(release_files + libapr-1.0.3.7.dylib + libapr-1.0.3.8.dylib + libapr-1.dylib + libaprutil-1.0.3.8.dylib + libaprutil-1.0.3.9.dylib + libaprutil-1.dylib + libexpat.0.5.0.dylib + libexpat.dylib + libllqtwebkit.dylib + libndofdev.dylib ) # fmod is statically linked on darwin @@ -162,10 +188,12 @@ elseif(LINUX) set(vivox_files ) # *TODO - update this to use LIBS_PREBUILT_DIR and LL_ARCH_DIR variables + # or ARCH_PREBUILT_DIRS set(debug_src_dir "${CMAKE_SOURCE_DIR}/../libraries/i686-linux/lib/debug") set(debug_files ) # *TODO - update this to use LIBS_PREBUILT_DIR and LL_ARCH_DIR variables + # or ARCH_PREBUILT_DIRS set(release_src_dir "${CMAKE_SOURCE_DIR}/../libraries/i686-linux/lib/release") set(release_files ) @@ -194,9 +222,11 @@ else(WINDOWS) set(vivox_src_dir "${CMAKE_SOURCE_DIR}/newview/vivox-runtime/i686-linux") set(vivox_files "") # *TODO - update this to use LIBS_PREBUILT_DIR and LL_ARCH_DIR variables + # or ARCH_PREBUILT_DIRS set(debug_src_dir "${CMAKE_SOURCE_DIR}/../libraries/i686-linux/lib/debug") set(debug_files "") # *TODO - update this to use LIBS_PREBUILT_DIR and LL_ARCH_DIR variables + # or ARCH_PREBUILT_DIRS set(release_src_dir "${CMAKE_SOURCE_DIR}/../libraries/i686-linux/lib/release") set(release_files "") @@ -210,6 +240,10 @@ else(WINDOWS) endif(WINDOWS) +################################################################ +# Done building the file lists, now set up the copy commands. +################################################################ + copy_if_different( ${vivox_src_dir} "${SHARED_LIB_STAGING_DIR_DEBUG}" -- cgit v1.2.3 From 90ea3d3b35de1463a00d60a257bc5723bddf780e Mon Sep 17 00:00:00 2001 From: brad kittenbrink Date: Mon, 2 Nov 2009 16:53:50 -0500 Subject: Implemented linux staging for DEV-41722 normalizing shared lib staging. --- indra/cmake/Copy3rdPartyLibs.cmake | 34 ++++++++++++++++++++++++++++++++-- 1 file changed, 32 insertions(+), 2 deletions(-) diff --git a/indra/cmake/Copy3rdPartyLibs.cmake b/indra/cmake/Copy3rdPartyLibs.cmake index 9eb19b3547..995bf79406 100644 --- a/indra/cmake/Copy3rdPartyLibs.cmake +++ b/indra/cmake/Copy3rdPartyLibs.cmake @@ -184,18 +184,48 @@ elseif(DARWIN) endif (EXISTS "${release_src_dir}/libllkdu.dylib") endif (NOT EXISTS ${internal_llkdu_path}) elseif(LINUX) + # linux is weird, multiple side by side configurations aren't supported + # and we don't seem to have any debug shared libs built yet anyways... + set(SHARED_LIB_STAGING_DIR_DEBUG "${SHARED_LIB_STAGING_DIR}") + set(SHARED_LIB_STAGING_DIR_RELWITHDEBINFO "${SHARED_LIB_STAGING_DIR}") + set(SHARED_LIB_STAGING_DIR_RELEASE "${SHARED_LIB_STAGING_DIR}") + set(vivox_src_dir "${CMAKE_SOURCE_DIR}/newview/vivox-runtime/i686-linux") set(vivox_files + libalut.so + libopenal.so.1 + libortp.so + libvivoxsdk.so + SLVoice ) # *TODO - update this to use LIBS_PREBUILT_DIR and LL_ARCH_DIR variables # or ARCH_PREBUILT_DIRS - set(debug_src_dir "${CMAKE_SOURCE_DIR}/../libraries/i686-linux/lib/debug") + set(debug_src_dir "${CMAKE_SOURCE_DIR}/../libraries/i686-linux/lib_debug") set(debug_files ) # *TODO - update this to use LIBS_PREBUILT_DIR and LL_ARCH_DIR variables # or ARCH_PREBUILT_DIRS - set(release_src_dir "${CMAKE_SOURCE_DIR}/../libraries/i686-linux/lib/release") + set(release_src_dir "${CMAKE_SOURCE_DIR}/../libraries/i686-linux/lib_release_client") + # *FIX - figure out what to do with duplicate libalut.so here -brad set(release_files + libapr-1.so + libaprutil-1.so + libatk-1.0.so + libcrypto.so + libexpat.so + libgmock_main.so + libgmock.so + libgmodule-2.0.so + libgobject-2.0.so + libgtest_main.so + libgtest.so + libopenal.so + libopenjpeg.so + libssl.so + libstacktrace.so + libtcmalloc.so + libuuid.so + libz.so ) if (FMOD_SDK_DIR) -- cgit v1.2.3 From f9c4682fb3ef489a1f22472b1295ca596626f78a Mon Sep 17 00:00:00 2001 From: brad kittenbrink Date: Tue, 3 Nov 2009 18:35:36 -0500 Subject: Continuing work on DEV-41724/DEV-41725 normalizing shared lib staging. It's basically working on linux. --- indra/cmake/Copy3rdPartyLibs.cmake | 16 +++++++++------- indra/cmake/LLAddBuildTest.cmake | 13 ++++++++++--- indra/cmake/Linking.cmake | 5 ++++- 3 files changed, 23 insertions(+), 11 deletions(-) diff --git a/indra/cmake/Copy3rdPartyLibs.cmake b/indra/cmake/Copy3rdPartyLibs.cmake index 995bf79406..b26d4cbefb 100644 --- a/indra/cmake/Copy3rdPartyLibs.cmake +++ b/indra/cmake/Copy3rdPartyLibs.cmake @@ -132,9 +132,9 @@ if (MSVC80) endif (MSVC80) elseif(DARWIN) - 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") + 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_src_dir "${CMAKE_SOURCE_DIR}/newview/vivox-runtime/universal-darwin") set(vivox_files @@ -208,17 +208,18 @@ elseif(LINUX) set(release_src_dir "${CMAKE_SOURCE_DIR}/../libraries/i686-linux/lib_release_client") # *FIX - figure out what to do with duplicate libalut.so here -brad set(release_files - libapr-1.so - libaprutil-1.so + libapr-1.so.0 + libaprutil-1.so.0 libatk-1.0.so libcrypto.so + libdb-4.2.so libexpat.so libgmock_main.so - libgmock.so + libgmock.so.0 libgmodule-2.0.so libgobject-2.0.so libgtest_main.so - libgtest.so + libgtest.so.0 libopenal.so libopenjpeg.so libssl.so @@ -226,6 +227,7 @@ elseif(LINUX) libtcmalloc.so libuuid.so libz.so + libssl.so.0.9.7 ) if (FMOD_SDK_DIR) diff --git a/indra/cmake/LLAddBuildTest.cmake b/indra/cmake/LLAddBuildTest.cmake index d8f64199cf..bf4d9b72a9 100644 --- a/indra/cmake/LLAddBuildTest.cmake +++ b/indra/cmake/LLAddBuildTest.cmake @@ -107,6 +107,8 @@ INCLUDE(GoogleMock) # Setup target ADD_EXECUTABLE(PROJECT_${project}_TEST_${name} ${${name}_test_SOURCE_FILES}) + SET_TARGET_PROPERTIES(PROJECT_${project}_TEST_${name} PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${EXE_STAGING_DIR}) + # # Per-codefile additional / external project dep and lib dep property extraction # @@ -142,8 +144,10 @@ INCLUDE(GoogleMock) IF(WINDOWS) set(LD_LIBRARY_PATH ${SHARED_LIB_STAGING_DIR}/${CMAKE_CFG_INTDIR}) + ELSEIF(DARWIN) + set(LD_LIBRARY_PATH ${SHARED_LIB_STAGING_DIR}/${CMAKE_CFG_INTDIR}/Resources:/usr/lib) ELSE(WINDOWS) - set(LD_LIBRARY_PATH ${ARCH_PREBUILT_DIRS}:${SHARED_LIB_STAGING_DIR}/${CMAKE_CFG_INTDIR}:/usr/lib) + set(LD_LIBRARY_PATH ${SHARED_LIB_STAGING_DIR}:/usr/lib) ENDIF(WINDOWS) LL_TEST_COMMAND("${LD_LIBRARY_PATH}" ${TEST_CMD}) @@ -200,6 +204,7 @@ FUNCTION(LL_ADD_INTEGRATION_TEST message(STATUS "ADD_EXECUTABLE(INTEGRATION_TEST_${testname} ${source_files})") endif(TEST_DEBUG) ADD_EXECUTABLE(INTEGRATION_TEST_${testname} ${source_files}) + SET_TARGET_PROPERTIES(INTEGRATION_TEST_${testname} PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${EXE_STAGING_DIR}) # Add link deps to the executable if(TEST_DEBUG) @@ -230,8 +235,10 @@ FUNCTION(LL_ADD_INTEGRATION_TEST IF(WINDOWS) set(LD_LIBRARY_PATH ${SHARED_LIB_STAGING_DIR}/${CMAKE_CFG_INTDIR}) + ELSEIF(DARWIN) + set(LD_LIBRARY_PATH ${SHARED_LIB_STAGING_DIR}/${CMAKE_CFG_INTDIR}/Resources:/usr/lib) ELSE(WINDOWS) - set(LD_LIBRARY_PATH ${ARCH_PREBUILT_DIRS}:${SHARED_LIB_STAGING_DIR}/${CMAKE_CFG_INTDIR}:/usr/lib) + set(LD_LIBRARY_PATH ${SHARED_LIB_STAGING_DIR}:/usr/lib) ENDIF(WINDOWS) LL_TEST_COMMAND("${LD_LIBRARY_PATH}" ${test_command}) @@ -250,4 +257,4 @@ FUNCTION(LL_ADD_INTEGRATION_TEST # Use CTEST? Not sure how to yet... # ADD_TEST(INTEGRATION_TEST_RUNNER_${testname} ${TEST_SCRIPT_CMD}) -ENDFUNCTION(LL_ADD_INTEGRATION_TEST) \ No newline at end of file +ENDFUNCTION(LL_ADD_INTEGRATION_TEST) diff --git a/indra/cmake/Linking.cmake b/indra/cmake/Linking.cmake index 1f3553539f..cce73ba08b 100644 --- a/indra/cmake/Linking.cmake +++ b/indra/cmake/Linking.cmake @@ -6,6 +6,7 @@ if (NOT STANDALONE) set(ARCH_PREBUILT_DIRS_RELEASE ${LIBS_PREBUILT_DIR}/${LL_ARCH_DIR}/lib/release) set(ARCH_PREBUILT_DIRS_DEBUG ${LIBS_PREBUILT_DIR}/${LL_ARCH_DIR}/lib/debug) set(SHARED_LIB_STAGING_DIR ${CMAKE_BINARY_DIR}/sharedlibs CACHE FILEPATH "Location of staged DLLs") + set(EXE_STAGING_DIR ${CMAKE_BINARY_DIR}/sharedlibs CACHE FILEPATH "Location of staged executables") elseif (LINUX) if (VIEWER) set(ARCH_PREBUILT_DIRS ${LIBS_PREBUILT_DIR}/${LL_ARCH_DIR}/lib_release_client) @@ -14,12 +15,14 @@ if (NOT STANDALONE) endif (VIEWER) set(ARCH_PREBUILT_DIRS_RELEASE ${ARCH_PREBUILT_DIRS}) set(ARCH_PREBUILT_DIRS_DEBUG ${ARCH_PREBUILT_DIRS}) - set(SHARED_LIB_STAGING_DIR ${CMAKE_BINARY_DIR}/sharedlibs CACHE FILEPATH "Location of staged .sos") + set(SHARED_LIB_STAGING_DIR ${CMAKE_BINARY_DIR}/sharedlibs/lib CACHE FILEPATH "Location of staged .sos") + set(EXE_STAGING_DIR ${CMAKE_BINARY_DIR}/sharedlibs/bin CACHE FILEPATH "Location of staged executables") elseif (DARWIN) set(ARCH_PREBUILT_DIRS_RELEASE ${LIBS_PREBUILT_DIR}/${LL_ARCH_DIR}/lib_release) set(ARCH_PREBUILT_DIRS ${ARCH_PREBUILT_DIRS_RELEASE}) set(ARCH_PREBUILT_DIRS_DEBUG ${ARCH_PREBUILT_DIRS_RELEASE}) set(SHARED_LIB_STAGING_DIR ${CMAKE_BINARY_DIR}/sharedlibs CACHE FILEPATH "Location of staged DLLs") + set(EXE_STAGING_DIR ${CMAKE_BINARY_DIR}/sharedlibs CACHE FILEPATH "Location of staged executables") endif (WINDOWS) endif (NOT STANDALONE) -- cgit v1.2.3 From 4bff7b085381a514afb7e8546beaac5ad6117f9b Mon Sep 17 00:00:00 2001 From: brad kittenbrink Date: Wed, 4 Nov 2009 18:50:35 -0500 Subject: Wrap-up work for DEV-41724/DEV-41725 - normalizing shared library staging on all 3 platforms. Should now work out of the box on all 3 platforms and in the debugger. --- indra/cmake/Linking.cmake | 2 +- indra/llcommon/CMakeLists.txt | 9 ++++++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/indra/cmake/Linking.cmake b/indra/cmake/Linking.cmake index cce73ba08b..bca99caf2a 100644 --- a/indra/cmake/Linking.cmake +++ b/indra/cmake/Linking.cmake @@ -22,7 +22,7 @@ if (NOT STANDALONE) set(ARCH_PREBUILT_DIRS ${ARCH_PREBUILT_DIRS_RELEASE}) set(ARCH_PREBUILT_DIRS_DEBUG ${ARCH_PREBUILT_DIRS_RELEASE}) set(SHARED_LIB_STAGING_DIR ${CMAKE_BINARY_DIR}/sharedlibs CACHE FILEPATH "Location of staged DLLs") - set(EXE_STAGING_DIR ${CMAKE_BINARY_DIR}/sharedlibs CACHE FILEPATH "Location of staged executables") + set(EXE_STAGING_DIR "${CMAKE_BINARY_DIR}/sharedlibs/\$(CONFIGURATION)" CACHE FILEPATH "Location of staged executables") endif (WINDOWS) endif (NOT STANDALONE) diff --git a/indra/llcommon/CMakeLists.txt b/indra/llcommon/CMakeLists.txt index 7a7281a4a7..1e39a4474f 100644 --- a/indra/llcommon/CMakeLists.txt +++ b/indra/llcommon/CMakeLists.txt @@ -248,6 +248,13 @@ if(LLCOMMON_LINK_SHARED) if(NOT WINDOWS) get_target_property(LLCOMMON_PATH llcommon LOCATION) get_filename_component(LLCOMMON_FILE ${LLCOMMON_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 llcommon POST_BUILD COMMAND ${CMAKE_COMMAND} @@ -255,7 +262,7 @@ if(LLCOMMON_LINK_SHARED) -E copy_if_different ${LLCOMMON_PATH} - ${SHARED_LIB_STAGING_DIR}/${CMAKE_CFG_INTDIR}/${LLCOMMON_FILE} + ${SHARED_LIB_STAGING_DIR_CONFIG}/${LLCOMMON_FILE} COMMENT "Copying llcommon to the staging folder." ) endif(NOT WINDOWS) -- cgit v1.2.3