diff options
-rwxr-xr-x[-rw-r--r--] | indra/cmake/CMakeLists.txt | 1 | ||||
-rwxr-xr-x[-rw-r--r--] | indra/cmake/Copy3rdPartyLibs.cmake | 37 | ||||
-rwxr-xr-x[-rw-r--r--] | indra/cmake/FMOD.cmake | 69 | ||||
-rwxr-xr-x | indra/cmake/FindFMOD.cmake | 50 | ||||
-rwxr-xr-x[-rw-r--r--] | indra/newview/CMakeLists.txt | 4 | ||||
-rwxr-xr-x[-rw-r--r--] | indra/newview/viewer_manifest.py | 12 |
6 files changed, 88 insertions, 85 deletions
diff --git a/indra/cmake/CMakeLists.txt b/indra/cmake/CMakeLists.txt index 4fc25dcc24..6470836286 100644..100755 --- a/indra/cmake/CMakeLists.txt +++ b/indra/cmake/CMakeLists.txt @@ -26,6 +26,7 @@ set(cmake_SOURCE_FILES FindBerkeleyDB.cmake FindCARes.cmake FindELFIO.cmake + FindFMOD.cmake FindGooglePerfTools.cmake FindMono.cmake FindMT.cmake diff --git a/indra/cmake/Copy3rdPartyLibs.cmake b/indra/cmake/Copy3rdPartyLibs.cmake index 95ed5d6bc8..e852cf463c 100644..100755 --- a/indra/cmake/Copy3rdPartyLibs.cmake +++ b/indra/cmake/Copy3rdPartyLibs.cmake @@ -55,9 +55,10 @@ if(WINDOWS) set(release_files ${release_files} libtcmalloc_minimal.dll) endif(USE_GOOGLE_PERFTOOLS) - if (FMOD_SDK_DIR) - set(fmod_files fmod.dll) - endif (FMOD_SDK_DIR) + if (FMOD) + set(debug_files ${debug_files} fmod.dll) + set(release_files ${release_files} fmod.dll) + endif (FMOD) #******************************* # LLKDU @@ -237,9 +238,9 @@ elseif(LINUX) libssl.so.0.9.7 ) - if (FMOD_SDK_DIR) - set(fmod_files "libfmod-3.75.so") - endif (FMOD_SDK_DIR) + if (FMOD) + set(release_files ${release_files} "libfmod-3.75.so") + endif (FMOD) #******************************* # LLKDU @@ -333,30 +334,6 @@ 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") diff --git a/indra/cmake/FMOD.cmake b/indra/cmake/FMOD.cmake index 759b8f1340..4582017bcb 100644..100755 --- a/indra/cmake/FMOD.cmake +++ b/indra/cmake/FMOD.cmake @@ -1,62 +1,35 @@ # -*- cmake -*- +include(Prebuilt) -include(Linking) +set(FMOD_FIND_QUIETLY OFF) +set(FMOD_FIND_REQUIRED OFF) -if(INSTALL_PROPRIETARY) - include(Prebuilt) +if (STANDALONE) + include(FindFMOD) +else (STANDALONE) use_prebuilt_binary(fmod) -endif(INSTALL_PROPRIETARY) - -find_library(FMOD_LIBRARY_RELEASE - NAMES fmod fmodvc fmod-3.75 - PATHS - ${ARCH_PREBUILT_DIRS_RELEASE} - ) - -find_library(FMOD_LIBRARY_DEBUG - NAMES fmod fmodvc fmod-3.75 - PATHS - ${ARCH_PREBUILT_DIRS_DEBUG} - ) - -if (FMOD_LIBRARY_RELEASE AND FMOD_LIBRARY_DEBUG) - set(FMOD_LIBRARY - debug ${FMOD_LIBRARY_DEBUG} - optimized ${FMOD_LIBRARY_RELEASE}) -elseif (FMOD_LIBRARY_RELEASE) - set(FMOD_LIBRARY ${FMOD_LIBRARY_RELEASE}) -endif (FMOD_LIBRARY_RELEASE AND FMOD_LIBRARY_DEBUG) - -if (NOT FMOD_LIBRARY) - set(FMOD_SDK_DIR CACHE PATH "Path to the FMOD SDK.") - if (FMOD_SDK_DIR) - find_library(FMOD_LIBRARY - NAMES fmodvc fmod-3.75 fmod - PATHS - ${FMOD_SDK_DIR}/api/lib - ${FMOD_SDK_DIR}/api - ${FMOD_SDK_DIR}/lib - ${FMOD_SDK_DIR} - ) - endif (FMOD_SDK_DIR) -endif (NOT FMOD_LIBRARY) - -find_path(FMOD_INCLUDE_DIR fmod.h - ${LIBS_PREBUILT_DIR}/include - ${FMOD_SDK_DIR}/api/inc - ${FMOD_SDK_DIR}/inc - ${FMOD_SDK_DIR} - ) + + if (WINDOWS) + set(FMOD_LIBRARY fmod) + elseif (DARWIN) + set(FMOD_LIBRARY fmod) + elseif (LINUX) + set(FMOD_LIBRARY fmod-3.75) + endif (WINDOWS) + SET(FMOD_LIBRARIES ${FMOD_LIBRARY}) + + set(FMOD_INCLUDE_DIR ${LIBS_PREBUILT_DIR}/include) +endif (STANDALONE) if (FMOD_LIBRARY AND FMOD_INCLUDE_DIR) - set(FMOD ON CACHE BOOL "Use closed source FMOD sound library.") + set(FMOD ON CACHE BOOL "Use FMOD sound library.") else (FMOD_LIBRARY AND FMOD_INCLUDE_DIR) set(FMOD_LIBRARY "") set(FMOD_INCLUDE_DIR "") if (FMOD) - message(STATUS "No support for FMOD audio (need to set FMOD_SDK_DIR?)") + message(STATUS "No support for FMOD audio found.") endif (FMOD) - set(FMOD OFF CACHE BOOL "Use closed source FMOD sound library.") + set(FMOD OFF CACHE BOOL "FMOD sound library not used.") endif (FMOD_LIBRARY AND FMOD_INCLUDE_DIR) if (FMOD) diff --git a/indra/cmake/FindFMOD.cmake b/indra/cmake/FindFMOD.cmake new file mode 100755 index 0000000000..3659e97e61 --- /dev/null +++ b/indra/cmake/FindFMOD.cmake @@ -0,0 +1,50 @@ +# -*- cmake -*- + +# - Find FMOD +# Find the FMOD includes and library +# This module defines +# FMOD_INCLUDE_DIR, where to find fmod.h and fmod_errors.h +# FMOD_LIBRARIES, the libraries needed to use FMOD. +# FMOD, If false, do not try to use FMOD. +# also defined, but not for general use are +# FMOD_LIBRARY, where to find the FMOD library. + +FIND_PATH(FMOD_INCLUDE_DIR fmod.h +/usr/local/include/fmod +/usr/local/include +/usr/include/fmod +/usr/include +) + +SET(FMOD_NAMES ${FMOD_NAMES} fmod fmodvc fmod-3.75) +FIND_LIBRARY(FMOD_LIBRARY + NAMES ${FMOD_NAMES} + PATHS /usr/lib /usr/local/lib + ) + +IF (FMOD_LIBRARY AND FMOD_INCLUDE_DIR) + SET(FMOD_LIBRARIES ${FMOD_LIBRARY}) + SET(FMOD "YES") +ELSE (FMOD_LIBRARY AND FMOD_INCLUDE_DIR) + SET(FMOD "NO") +ENDIF (FMOD_LIBRARY AND FMOD_INCLUDE_DIR) + + +IF (FMOD) + IF (NOT FMOD_FIND_QUIETLY) + MESSAGE(STATUS "Found FMOD: ${FMOD_LIBRARIES}") + ENDIF (NOT FMOD_FIND_QUIETLY) +ELSE (FMOD) + IF (FMOD_FIND_REQUIRED) + MESSAGE(FATAL_ERROR "Could not find FMOD library") + ENDIF (FMOD_FIND_REQUIRED) +ENDIF (FMOD) + +# Deprecated declarations. +SET (NATIVE_FMOD_INCLUDE_PATH ${FMOD_INCLUDE_DIR} ) +GET_FILENAME_COMPONENT (NATIVE_FMOD_LIB_PATH ${FMOD_LIBRARY} PATH) + +MARK_AS_ADVANCED( + FMOD_LIBRARY + FMOD_INCLUDE_DIR + ) diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index 1f4302d870..ce98ecb2b1 100644..100755 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -1471,6 +1471,9 @@ if (WINDOWS) ${SHARED_LIB_STAGING_DIR}/Release/openjpeg.dll ${SHARED_LIB_STAGING_DIR}/RelWithDebInfo/openjpeg.dll ${SHARED_LIB_STAGING_DIR}/Debug/openjpegd.dll + ${SHARED_LIB_STAGING_DIR}/Release/fmod.dll + ${SHARED_LIB_STAGING_DIR}/RelWithDebInfo/fmod.dll + ${SHARED_LIB_STAGING_DIR}/Debug/fmod.dll ${SHARED_LIB_STAGING_DIR}/Release/msvcr80.dll ${SHARED_LIB_STAGING_DIR}/Release/msvcp80.dll ${SHARED_LIB_STAGING_DIR}/Release/Microsoft.VC80.CRT.manifest @@ -1492,7 +1495,6 @@ if (WINDOWS) ${CMAKE_CURRENT_SOURCE_DIR}/featuretable.txt ${CMAKE_CURRENT_SOURCE_DIR}/featuretable_xp.txt ${CMAKE_CURRENT_SOURCE_DIR}/dbghelp.dll - ${CMAKE_CURRENT_SOURCE_DIR}/fmod.dll ${ARCH_PREBUILT_DIRS_RELEASE}/libeay32.dll ${ARCH_PREBUILT_DIRS_RELEASE}/qtcore4.dll ${ARCH_PREBUILT_DIRS_RELEASE}/qtgui4.dll diff --git a/indra/newview/viewer_manifest.py b/indra/newview/viewer_manifest.py index 949fa3cc1c..26adc78459 100644..100755 --- a/indra/newview/viewer_manifest.py +++ b/indra/newview/viewer_manifest.py @@ -259,6 +259,12 @@ class WindowsManifest(ViewerManifest): except RuntimeError: print "Skipping llkdu.dll" + # Get fmod dll, continue if missing + try: + self.path("fmod.dll") + except: + print "Skipping fmod.dll" + # Get llcommon and deps. If missing assume static linkage and continue. try: self.path('llcommon.dll') @@ -315,12 +321,6 @@ class WindowsManifest(ViewerManifest): # For use in crash reporting (generates minidumps) self.path("dbghelp.dll") - try: - # FMOD for sound - self.path("fmod.dll") - except: - print "Skipping FMOD - not found" - self.enable_no_crt_manifest_check() # Media plugins - QuickTime |