mirror of
https://github.com/mackron/miniaudio.git
synced 2026-04-24 01:04:02 +02:00
CMake: Remove is_backend_enabled()
This is no longer necessary since we can just use MINIAUDIO_NO_[BACKEND] as the standard way to check if a backend is enabled.
This commit is contained in:
+4
-16
@@ -159,14 +159,6 @@ elseif(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
|
|||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
|
||||||
function(is_backend_enabled NAME)
|
|
||||||
if (NOT MINIAUDIO_NO_${NAME} AND (NOT MINIAUDIO_ENABLE_ONLY_SPECIFIC_BACKENDS OR MINIAUDIO_ENABLE_${NAME}))
|
|
||||||
set(${NAME}_ENABLED TRUE PARENT_SCOPE)
|
|
||||||
else()
|
|
||||||
set(${NAME}_ENABLED FALSE PARENT_SCOPE)
|
|
||||||
endif()
|
|
||||||
endfunction()
|
|
||||||
|
|
||||||
|
|
||||||
# External Libraries
|
# External Libraries
|
||||||
set(LINKED_LIBS)
|
set(LINKED_LIBS)
|
||||||
@@ -709,8 +701,7 @@ endif()
|
|||||||
|
|
||||||
|
|
||||||
if(MINIAUDIO_NO_RUNTIME_LINKING)
|
if(MINIAUDIO_NO_RUNTIME_LINKING)
|
||||||
is_backend_enabled(PULSEAUDIO)
|
if (NOT MINIAUDIO_NO_PULSEAUDIO)
|
||||||
if (PULSEAUDIO_ENABLED)
|
|
||||||
find_package(PulseAudio)
|
find_package(PulseAudio)
|
||||||
|
|
||||||
if (PulseAudio_FOUND)
|
if (PulseAudio_FOUND)
|
||||||
@@ -720,8 +711,7 @@ if(MINIAUDIO_NO_RUNTIME_LINKING)
|
|||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
is_backend_enabled(ALSA)
|
if (NOT MINIAUDIO_NO_ALSA)
|
||||||
if (ALSA_ENABLED)
|
|
||||||
find_package(PkgConfig QUIET)
|
find_package(PkgConfig QUIET)
|
||||||
|
|
||||||
if(PKG_CONFIG_FOUND)
|
if(PKG_CONFIG_FOUND)
|
||||||
@@ -745,8 +735,7 @@ if(MINIAUDIO_NO_RUNTIME_LINKING)
|
|||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
is_backend_enabled(SNDIO)
|
if (NOT MINIAUDIO_NO_SNDIO)
|
||||||
if (SNDIO_ENABLED)
|
|
||||||
find_package(PkgConfig QUIET)
|
find_package(PkgConfig QUIET)
|
||||||
|
|
||||||
if(PKG_CONFIG_FOUND)
|
if(PKG_CONFIG_FOUND)
|
||||||
@@ -764,8 +753,7 @@ if(MINIAUDIO_NO_RUNTIME_LINKING)
|
|||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
is_backend_enabled(JACK)
|
if (NOT MINIAUDIO_NO_JACK)
|
||||||
if (JACK_ENABLED)
|
|
||||||
find_package(PkgConfig QUIET)
|
find_package(PkgConfig QUIET)
|
||||||
|
|
||||||
if(PKG_CONFIG_FOUND)
|
if(PKG_CONFIG_FOUND)
|
||||||
|
|||||||
Reference in New Issue
Block a user