summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbrad kittenbrink <brad@lindenlab.com>2009-10-26 16:08:43 -0400
committerbrad kittenbrink <brad@lindenlab.com>2009-10-26 16:08:43 -0400
commita17ca8260aa4a1e414b6a19d3faeb18f914c3f31 (patch)
tree35b81391e114b40b3a2c3fbc99b8236b8d6a72bd
parente84ff39e4c7c5b028a6b8b4f6dc5d37c525eb1c4 (diff)
Beginning work for DEV-41722 normalizing shared lib staging on all 3 platforms. Renamed CopyWinLibs.cmake to Copy3rdPartyLibs.cmake.
-rw-r--r--indra/cmake/CMakeLists.txt2
-rw-r--r--indra/cmake/Copy3rdPartyLibs.cmake223
-rw-r--r--indra/llcommon/CMakeLists.txt4
3 files changed, 225 insertions, 4 deletions
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}