diff options
| author | brad kittenbrink <brad@lindenlab.com> | 2009-10-29 18:03:46 -0400 | 
|---|---|---|
| committer | brad kittenbrink <brad@lindenlab.com> | 2009-10-29 18:03:46 -0400 | 
| commit | 1b6d09f1d21a946a174d09d421e14c27dc3d8b94 (patch) | |
| tree | d001b50733dbc1fe70b09c4030b00f9df07ea955 | |
| parent | b86d4b2299aa0b9321ddcbdb5246fe131aa4255c (diff) | |
| parent | 89e3523052a9b1ac5534e3e30fa312ef11a78f69 (diff) | |
Automated merge with ssh://hg.lindenlab.com/viewer/viewer-2-0/
| -rw-r--r-- | indra/cmake/CMakeLists.txt | 2 | ||||
| -rw-r--r-- | indra/cmake/Copy3rdPartyLibs.cmake | 268 | ||||
| -rw-r--r-- | indra/llcommon/CMakeLists.txt | 4 | 
3 files changed, 270 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..cb8ed4f05f --- /dev/null +++ b/indra/cmake/Copy3rdPartyLibs.cmake @@ -0,0 +1,268 @@ +# -*- 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) +    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 +    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} +        ) +    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") + +    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) +    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} +  ) 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} | 
