summaryrefslogtreecommitdiff
path: root/indra/cmake
diff options
context:
space:
mode:
authorbrad kittenbrink <brad@lindenlab.com>2009-10-26 18:13:20 -0400
committerbrad kittenbrink <brad@lindenlab.com>2009-10-26 18:13:20 -0400
commit89e3523052a9b1ac5534e3e30fa312ef11a78f69 (patch)
tree6ae37ed49bb1a288db3f6dfcffc99edea822bc46 /indra/cmake
parenta17ca8260aa4a1e414b6a19d3faeb18f914c3f31 (diff)
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.
Diffstat (limited to 'indra/cmake')
-rw-r--r--indra/cmake/Copy3rdPartyLibs.cmake177
1 files 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}