diff options
author | Loren Shih <seraph@lindenlab.com> | 2010-10-21 14:18:29 -0400 |
---|---|---|
committer | Loren Shih <seraph@lindenlab.com> | 2010-10-21 14:18:29 -0400 |
commit | 525de5554022b946641db446a5b5153f9e670e10 (patch) | |
tree | d7d679724515f6eb839f87161510ba0a0d06c89b /indra/cmake | |
parent | 219cd6ecda60e1c48852f582f0994573fd0e10ae (diff) | |
parent | 71f56a2bc9697989cd012adb57abdc922aa8ae0a (diff) |
Automated merge up from viewer-development
Diffstat (limited to 'indra/cmake')
-rw-r--r-- | indra/cmake/CMakeLists.txt | 1 | ||||
-rw-r--r-- | indra/cmake/Copy3rdPartyLibs.cmake | 37 | ||||
-rw-r--r-- | indra/cmake/FMOD.cmake | 78 | ||||
-rw-r--r-- | indra/cmake/FindFMOD.cmake | 44 | ||||
-rw-r--r-- | indra/cmake/run_build_test.py | 2 |
5 files changed, 72 insertions, 90 deletions
diff --git a/indra/cmake/CMakeLists.txt b/indra/cmake/CMakeLists.txt index 4fc25dcc24..6470836286 100644 --- 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 --- 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..96434e38fa 100644 --- a/indra/cmake/FMOD.cmake +++ b/indra/cmake/FMOD.cmake @@ -1,64 +1,24 @@ # -*- cmake -*- -include(Linking) - -if(INSTALL_PROPRIETARY) - include(Prebuilt) - 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 (FMOD_LIBRARY AND FMOD_INCLUDE_DIR) - set(FMOD ON CACHE BOOL "Use closed source 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?)") - endif (FMOD) - set(FMOD OFF CACHE BOOL "Use closed source FMOD sound library.") -endif (FMOD_LIBRARY AND FMOD_INCLUDE_DIR) +set(FMOD ON CACHE BOOL "Use FMOD sound library.") if (FMOD) - message(STATUS "Building with FMOD audio support") + if (STANDALONE) + set(FMOD_FIND_REQUIRED ON) + include(FindFMOD) + else (STANDALONE) + include(Prebuilt) + use_prebuilt_binary(fmod) + + 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) endif (FMOD) diff --git a/indra/cmake/FindFMOD.cmake b/indra/cmake/FindFMOD.cmake new file mode 100644 index 0000000000..e60b386027 --- /dev/null +++ b/indra/cmake/FindFMOD.cmake @@ -0,0 +1,44 @@ +# -*- 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 PATH_SUFFIXES fmod) + +SET(FMOD_NAMES ${FMOD_NAMES} fmod fmodvc fmod-3.75) +FIND_LIBRARY(FMOD_LIBRARY + NAMES ${FMOD_NAMES} + PATH_SUFFIXES fmod + ) + +IF (FMOD_LIBRARY AND FMOD_INCLUDE_DIR) + SET(FMOD_LIBRARIES ${FMOD_LIBRARY}) + SET(FMOD_FOUND "YES") +ELSE (FMOD_LIBRARY AND FMOD_INCLUDE_DIR) + SET(FMOD_FOUND "NO") +ENDIF (FMOD_LIBRARY AND FMOD_INCLUDE_DIR) + +IF (FMOD_FOUND) + IF (NOT FMOD_FIND_QUIETLY) + MESSAGE(STATUS "Found FMOD: ${FMOD_LIBRARIES}") + ENDIF (NOT FMOD_FIND_QUIETLY) +ELSE (FMOD_FOUND) + IF (FMOD_FIND_REQUIRED) + MESSAGE(FATAL_ERROR "Could not find FMOD library") + ENDIF (FMOD_FIND_REQUIRED) +ENDIF (FMOD_FOUND) + +# 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/cmake/run_build_test.py b/indra/cmake/run_build_test.py index e377aeef48..37aa75e364 100644 --- a/indra/cmake/run_build_test.py +++ b/indra/cmake/run_build_test.py @@ -24,7 +24,7 @@ myprog somearg otherarg $LicenseInfo:firstyear=2009&license=viewerlgpl$ Second Life Viewer Source Code -Copyright (C) 2010, Linden Research, Inc. +Copyright (C) 2009-2010, Linden Research, Inc. This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public |