Newer
Older
# -*- 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)
###################################################################
# set up platform specific lists of files that need to be copied
###################################################################
if(WINDOWS)
brad kittenbrink
committed
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")
set(vivox_files
SLVoice.exe
libsndfile-1.dll
vivoxsdk.dll
ortp.dll
)
#*******************************
# 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
libapr-1.dll
libaprutil-1.dll
libapriconv-1.dll
)
# *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
libapr-1.dll
libaprutil-1.dll
libapriconv-1.dll
)
if(USE_GOOGLE_PERFTOOLS)
set(debug_files ${debug_files} libtcmalloc_minimal-debug.dll)
set(release_files ${release_files} libtcmalloc_minimal.dll)
endif(USE_GOOGLE_PERFTOOLS)
Merov Linden
committed
if (FMOD)
set(debug_files ${debug_files} fmod.dll)
set(release_files ${release_files} fmod.dll)
endif (FMOD)
#*******************************
# 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}
brad kittenbrink
committed
"${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}
brad kittenbrink
committed
"${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}
brad kittenbrink
committed
"${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)
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")
brad kittenbrink
committed
set(vivox_src_dir "${CMAKE_SOURCE_DIR}/newview/vivox-runtime/universal-darwin")
set(vivox_files
SLVoice
libortp.dylib
libvivoxsdk.dylib
brad kittenbrink
committed
)
# *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/universal-darwin/lib_debug")
brad kittenbrink
committed
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/universal-darwin/lib_release")
brad kittenbrink
committed
set(release_files
libapr-1.0.3.7.dylib
libapr-1.dylib
libaprutil-1.0.3.8.dylib
libaprutil-1.dylib
libexpat.0.5.0.dylib
libexpat.dylib
libllqtwebkit.dylib
libndofdev.dylib
libexception_handler.dylib
brad kittenbrink
committed
)
# fmod is statically linked on darwin
set(fmod_files "")
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}")
brad kittenbrink
committed
set(vivox_src_dir "${CMAKE_SOURCE_DIR}/newview/vivox-runtime/i686-linux")
set(vivox_files
libortp.so
libvivoxsdk.so
SLVoice
brad kittenbrink
committed
)
# *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")
brad kittenbrink
committed
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_client")
# *FIX - figure out what to do with duplicate libalut.so here -brad
brad kittenbrink
committed
set(release_files
libapr-1.so.0
libaprutil-1.so.0
libatk-1.0.so
libbreakpad_client.so.0
libcrypto.so.0.9.7
libdb-4.2.so
libexpat.so
libexpat.so.1
libgmock_main.so
libgmock.so.0
libgmodule-2.0.so
libgobject-2.0.so
libgtest_main.so
libgtest.so.0
libopenal.so
libopenjpeg.so
libssl.so
libstacktrace.so
libtcmalloc.so
libssl.so.0.9.7
brad kittenbrink
committed
)
Merov Linden
committed
if (FMOD)
set(release_files ${release_files} "libfmod-3.75.so")
endif (FMOD)
else(WINDOWS)
message(STATUS "WARNING: unrecognized platform for staging 3rd party libs, skipping...")
brad kittenbrink
committed
set(vivox_src_dir "${CMAKE_SOURCE_DIR}/newview/vivox-runtime/i686-linux")
set(vivox_files "")
brad kittenbrink
committed
# *TODO - update this to use LIBS_PREBUILT_DIR and LL_ARCH_DIR variables
# or ARCH_PREBUILT_DIRS
brad kittenbrink
committed
set(debug_src_dir "${CMAKE_SOURCE_DIR}/../libraries/i686-linux/lib/debug")
set(debug_files "")
brad kittenbrink
committed
# *TODO - update this to use LIBS_PREBUILT_DIR and LL_ARCH_DIR variables
# or ARCH_PREBUILT_DIRS
brad kittenbrink
committed
set(release_src_dir "${CMAKE_SOURCE_DIR}/../libraries/i686-linux/lib/release")
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)
brad kittenbrink
committed
################################################################
# Done building the file lists, now set up the copy commands.
################################################################
brad kittenbrink
committed
copy_if_different(
${vivox_src_dir}
"${SHARED_LIB_STAGING_DIR_DEBUG}"
out_targets
Aimee Linden
committed
${vivox_files}
brad kittenbrink
committed
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
)
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})
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)
Aimee Linden
committed
if(NOT STANDALONE)
add_custom_target(
stage_third_party_libs ALL
DEPENDS ${third_party_targets}
)
endif(NOT STANDALONE)