mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-28 23:12:24 +00:00
- Check the version of FMOD in CMake to produce an error on the condition that OpenAL is also enabled and the FMOD version is low enough to also export Xiph symbols.
This commit is contained in:
parent
faea61cf01
commit
dd1f72bbf9
1 changed files with 13 additions and 0 deletions
|
@ -282,6 +282,19 @@ if( NOT NO_FMOD )
|
|||
|
||||
if( EXISTS "${FMOD_INCLUDE_DIR}/fmod_common.h" )
|
||||
set( FMOD_STUDIO YES )
|
||||
set( FMOD_VERSION_FILE "fmod_common.h" )
|
||||
else()
|
||||
set( FMOD_STUDIO NO )
|
||||
set( FMOD_VERSION_FILE "fmod.h" )
|
||||
endif()
|
||||
|
||||
file( STRINGS "${FMOD_INCLUDE_DIR}/${FMOD_VERSION_FILE}" FMOD_VERSION_LINE REGEX "^#define[ \t]+FMOD_VERSION[ \t]+0x[0-9]+$" )
|
||||
string( REGEX REPLACE "^#define[ \t]+FMOD_VERSION[ \t]+0x([0-9][0-9][0-9][0-9])([0-9][0-9])([0-9][0-9])$" "\\1.\\2.\\3" FMOD_VERSION "${FMOD_VERSION_LINE}" )
|
||||
message( STATUS "FMOD version: ${FMOD_VERSION}" )
|
||||
|
||||
# FMOD Ex didn't hide xiph symbols in the past (not applicable to Win32 since symbols are hidden by default there).
|
||||
if( NOT WIN32 AND NOT FMOD_STUDIO AND NOT NO_OPENAL AND "${FMOD_VERSION}" VERSION_LESS "4.36.00")
|
||||
message( SEND_ERROR "Use of FMOD Ex ${FMOD_VERSION} with OpenAL will result in crashes. Either update FMOD to 4.36 or later or set NO_OPENAL." )
|
||||
endif()
|
||||
else()
|
||||
message( STATUS "Could not find FMOD include files" )
|
||||
|
|
Loading…
Reference in a new issue