diff options
author | Merov Linden <merov@lindenlab.com> | 2010-10-02 18:30:52 -0700 |
---|---|---|
committer | Merov Linden <merov@lindenlab.com> | 2010-10-02 18:30:52 -0700 |
commit | d1ad7a56beee603b336600d4aace1e4d4c0f5ade (patch) | |
tree | 9bf26b89d321a1e851ece6fd4124947aae7ba8db /indra/cmake/FMOD.cmake | |
parent | b906a7a76aea1d06829237be3cb5336961f7dfce (diff) |
STORM-137 : Build script modif so that Windows build does not rely on fmod.dll being dropped in the source tree + addition to allow fmod to be found in standalone. Caution: wait an upcoming install.xml commit before pulling if building internaly.
Diffstat (limited to 'indra/cmake/FMOD.cmake')
-rwxr-xr-x[-rw-r--r--] | indra/cmake/FMOD.cmake | 69 |
1 files changed, 21 insertions, 48 deletions
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) |