diff options
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 42 |
1 files changed, 20 insertions, 22 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 68a58cae..0d868c9e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -37,14 +37,6 @@ ELSE() ENDIF() -OPTION(ALSOFT_BACKEND_MMDEVAPI "Check for MMDevApi backend" ON) -OPTION(ALSOFT_BACKEND_WINMM "Check for Windows Multimedia backend" ON) -OPTION(ALSOFT_BACKEND_OPENSL "Check for OpenSL backend" ON) - -OPTION(ALSOFT_REQUIRE_MMDEVAPI "Require MMDevApi" OFF) -OPTION(ALSOFT_REQUIRE_WINMM "Require Windows Multimedia backend" OFF) -OPTION(ALSOFT_REQUIRE_OPENSL "Require OpenSL backend" OFF) - OPTION(ALSOFT_DLOPEN "Check for the dlopen API for loading optional libs" ON) OPTION(ALSOFT_WERROR "Treat compile warnings as errors" OFF) @@ -738,10 +730,12 @@ IF(ALSOFT_REQUIRE_DSOUND AND NOT HAVE_DSOUND) ENDIF() # Check for MMDevApi backend +OPTION(ALSOFT_REQUIRE_MMDEVAPI "Require MMDevApi backend" OFF) IF(HAVE_WINDOWS_H) - IF(ALSOFT_BACKEND_MMDEVAPI) - CHECK_INCLUDE_FILE(mmdeviceapi.h HAVE_MMDEVICEAPI_H) - IF(HAVE_MMDEVICEAPI_H) + CHECK_INCLUDE_FILE(mmdeviceapi.h HAVE_MMDEVICEAPI_H) + IF(HAVE_MMDEVICEAPI_H) + OPTION(ALSOFT_BACKEND_MMDEVAPI "Enable MMDevApi backend" ON) + IF(ALSOFT_BACKEND_MMDEVAPI) SET(HAVE_MMDEVAPI 1) SET(ALC_OBJS ${ALC_OBJS} Alc/backends/mmdevapi.c) @@ -754,12 +748,14 @@ IF(ALSOFT_REQUIRE_MMDEVAPI AND NOT HAVE_MMDEVAPI) ENDIF() # Check MMSystem backend +OPTION(ALSOFT_REQUIRE_WINMM "Require Windows Multimedia backend" OFF) IF(HAVE_WINDOWS_H) - IF(ALSOFT_BACKEND_WINMM) - CHECK_INCLUDE_FILES("windows.h;mmsystem.h" HAVE_MMSYSTEM_H -D_WIN32_WINNT=0x0502) - IF(HAVE_MMSYSTEM_H) - CHECK_SHARED_FUNCTION_EXISTS(waveOutOpen "windows.h;mmsystem.h" winmm "" HAVE_LIBWINMM) - IF(HAVE_LIBWINMM) + CHECK_INCLUDE_FILES("windows.h;mmsystem.h" HAVE_MMSYSTEM_H -D_WIN32_WINNT=0x0502) + IF(HAVE_MMSYSTEM_H) + CHECK_SHARED_FUNCTION_EXISTS(waveOutOpen "windows.h;mmsystem.h" winmm "" HAVE_LIBWINMM) + IF(HAVE_LIBWINMM) + OPTION(ALSOFT_BACKEND_WINMM "Enable Windows Multimedia backend" ON) + IF(ALSOFT_BACKEND_WINMM) SET(HAVE_WINMM 1) SET(ALC_OBJS ${ALC_OBJS} Alc/backends/winmm.c) SET(BACKENDS "${BACKENDS} WinMM,") @@ -823,7 +819,7 @@ FIND_LIBRARY(COREAUDIO_FRAMEWORK PATHS /System/Library/Frameworks ) IF(COREAUDIO_FRAMEWORK) - OPTION(ALSOFT_BACKEND_COREAUDIO "Check for CoreAudio backend" ON) + OPTION(ALSOFT_BACKEND_COREAUDIO "Enable CoreAudio backend" ON) IF(ALSOFT_BACKEND_COREAUDIO) SET(HAVE_COREAUDIO 1) SET(ALC_OBJS ${ALC_OBJS} Alc/backends/coreaudio.c) @@ -850,11 +846,13 @@ IF(ALSOFT_REQUIRE_COREAUDIO AND NOT HAVE_COREAUDIO) ENDIF() # Check for OpenSL (Android) backend -IF(ALSOFT_BACKEND_OPENSL) - CHECK_INCLUDE_FILES("SLES/OpenSLES.h;SLES/OpenSLES_Android.h" HAVE_SLES_OPENSLES_ANDROID_H) - IF(HAVE_SLES_OPENSLES_ANDROID_H) - CHECK_SHARED_FUNCTION_EXISTS(slCreateEngine "SLES/OpenSLES.h" OpenSLES "" HAVE_LIBOPENSLES) - IF(HAVE_LIBOPENSLES) +OPTION(ALSOFT_REQUIRE_OPENSL "Require OpenSL backend" OFF) +CHECK_INCLUDE_FILES("SLES/OpenSLES.h;SLES/OpenSLES_Android.h" HAVE_SLES_OPENSLES_ANDROID_H) +IF(HAVE_SLES_OPENSLES_ANDROID_H) + CHECK_SHARED_FUNCTION_EXISTS(slCreateEngine "SLES/OpenSLES.h" OpenSLES "" HAVE_LIBOPENSLES) + IF(HAVE_LIBOPENSLES) + OPTION(ALSOFT_BACKEND_OPENSL "Enable OpenSL backend" ON) + IF(ALSOFT_BACKEND_OPENSL) SET(HAVE_OPENSL 1) SET(ALC_OBJS ${ALC_OBJS} Alc/backends/opensl.c) SET(BACKENDS "${BACKENDS} OpenSL,") |