Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
FMOD import stuff added from Phoenix, should fix win32-vc2005 buildbot
- Loading branch information
Showing
4 changed files
with
89 additions
and
91 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,64 +1,38 @@ | ||
# -*- 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) | ||
if (ARCH MATCHES "x86_64") | ||
MESSAGE(FATAL_ERROR "fmod not available for 64-bit. fmod can be disabled by passing -DFMOD=OFF to cmake configure step") | ||
endif (ARCH MATCHES x86_64) | ||
set(FMOD_FIND_REQUIRED ON) | ||
include(FindFMOD) | ||
else (STANDALONE) | ||
include(Prebuilt) | ||
use_prebuilt_binary(fmod) | ||
|
||
if (WINDOWS) | ||
set(FMOD_LIBRARY ${CMAKE_SOURCE_DIR}/../fmodapi375win/api/lib/fmodvc.lib) | ||
elseif (DARWIN) | ||
if (ARCH MATCHES "i386") | ||
set(FMOD_LIBRARY ${CMAKE_SOURCE_DIR}/../fmodapi375mac/api/lib/libfmodx86.a) | ||
else (ARCH MATCHES "i386") | ||
set(FMOD_LIBRARY ${CMAKE_SOURCE_DIR}/../fmodapi375mac/api/lib/libfmod.a) | ||
endif (ARCH MATCHES "i386") | ||
elseif (LINUX) | ||
set(FMOD_LIBRARY ${CMAKE_SOURCE_DIR}/../fmodapi375linux/api/libfmod-3.75.so) | ||
endif (WINDOWS) | ||
SET(FMOD_LIBRARIES ${FMOD_LIBRARY}) | ||
|
||
if (WINDOWS) | ||
set(FMOD_INCLUDE_DIR ${CMAKE_SOURCE_DIR}/../fmodapi375win/api/inc) | ||
elseif (DARWIN) | ||
set(FMOD_INCLUDE_DIR ${CMAKE_SOURCE_DIR}/../fmodapi375mac/api/inc) | ||
elseif (LINUX) | ||
set(FMOD_INCLUDE_DIR ${CMAKE_SOURCE_DIR}/../fmodapi375linux/api/inc) | ||
endif (WINDOWS) | ||
|
||
endif (STANDALONE) | ||
endif (FMOD) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters