167 lines
5.5 KiB
Text
167 lines
5.5 KiB
Text
Add switches to handle more options
|
|
|
|
--- CMakeLists.txt.orig 2015-07-31 10:04:05.000000000 +0000
|
|
+++ CMakeLists.txt 2015-10-09 20:18:35.617017157 +0000
|
|
@@ -8,6 +8,12 @@
|
|
option(TRY_X11 "Enables X11 Support" ON)
|
|
option(USE_SHARED_ENET "Use shared libenet if found rather than Dolphin's soon-to-compatibly-diverge version" OFF)
|
|
option(USE_UPNP "Enables UPnP port mapping support" ON)
|
|
+option(DISABLE_ALSA "Disable ALSA sound backend" OFF)
|
|
+option(DISABLE_AO "Disable ao sound backend" OFF)
|
|
+option(DISABLE_BLUEZ "Disable bluez (bluetooth) support" OFF)
|
|
+option(DISABLE_PULSEAUDIO "Disable PulseAudio sound backend" OFF)
|
|
+option(DISABLE_OPENAL "Disable OpenAL sound backend" OFF)
|
|
+option(DISABLE_PORTAUDIO "Disable PortAudio sound backend" OFF)
|
|
option(DISABLE_WX "Disable wxWidgets (use Qt or CLI interface)" OFF)
|
|
option(ENABLE_QT "Enable Qt (use the experimental Qt interface)" OFF)
|
|
option(ENABLE_PCH "Use PCH to speed up compilation" ON)
|
|
@@ -391,51 +397,76 @@
|
|
include(FindOpenGL)
|
|
include_directories(${OPENGL_INCLUDE_DIR})
|
|
|
|
- include(FindALSA OPTIONAL)
|
|
- if(ALSA_FOUND)
|
|
- add_definitions(-DHAVE_ALSA=1)
|
|
- message("ALSA found, enabling ALSA sound backend")
|
|
+ if(NOT DISABLE_ALSA)
|
|
+ include(FindALSA OPTIONAL)
|
|
+ if(ALSA_FOUND)
|
|
+ add_definitions(-DHAVE_ALSA=1)
|
|
+ message("ALSA found, enabling ALSA sound backend")
|
|
+ else()
|
|
+ add_definitions(-DHAVE_ALSA=0)
|
|
+ message("ALSA NOT found, disabling ALSA sound backend")
|
|
+ endif(ALSA_FOUND)
|
|
else()
|
|
add_definitions(-DHAVE_ALSA=0)
|
|
- message("ALSA NOT found, disabling ALSA sound backend")
|
|
- endif(ALSA_FOUND)
|
|
+ message("ALSA sound backend disabled")
|
|
+ endif()
|
|
|
|
- check_lib(AO ao ao QUIET)
|
|
- if(AO_FOUND)
|
|
- add_definitions(-DHAVE_AO=1)
|
|
- message("ao found, enabling ao sound backend")
|
|
+ if(NOT DISABLE_AO)
|
|
+ check_lib(AO ao ao QUIET)
|
|
+ if(AO_FOUND)
|
|
+ add_definitions(-DHAVE_AO=1)
|
|
+ message("ao found, enabling ao sound backend")
|
|
+ else()
|
|
+ add_definitions(-DHAVE_AO=0)
|
|
+ message("ao NOT found, disabling ao sound backend")
|
|
+ endif(AO_FOUND)
|
|
else()
|
|
add_definitions(-DHAVE_AO=0)
|
|
- message("ao NOT found, disabling ao sound backend")
|
|
- endif(AO_FOUND)
|
|
+ message("ao sound backend disabled")
|
|
+ endif()
|
|
|
|
- check_lib(BLUEZ bluez bluez QUIET)
|
|
- if(BLUEZ_FOUND)
|
|
- add_definitions(-DHAVE_BLUEZ=1)
|
|
- message("bluez found, enabling bluetooth support")
|
|
+ if(NOT DISABLE_BLUEZ)
|
|
+ check_lib(BLUEZ bluez bluez QUIET)
|
|
+ if(BLUEZ_FOUND)
|
|
+ add_definitions(-DHAVE_BLUEZ=1)
|
|
+ message("bluez found, enabling bluetooth support")
|
|
+ else()
|
|
+ add_definitions(-DHAVE_BLUEZ=0)
|
|
+ message("bluez NOT found, disabling bluetooth support")
|
|
+ endif(BLUEZ_FOUND)
|
|
else()
|
|
add_definitions(-DHAVE_BLUEZ=0)
|
|
- message("bluez NOT found, disabling bluetooth support")
|
|
- endif(BLUEZ_FOUND)
|
|
+ message("bluez (bluetooth) support disabled")
|
|
+ endif()
|
|
|
|
- check_lib(PULSEAUDIO libpulse pulse QUIET)
|
|
- if(PULSEAUDIO_FOUND)
|
|
- add_definitions(-DHAVE_PULSEAUDIO=1)
|
|
- message("PulseAudio found, enabling PulseAudio sound backend")
|
|
+ if(NOT DISABLE_PULSEAUDIO)
|
|
+ check_lib(PULSEAUDIO libpulse pulse QUIET)
|
|
+ if(PULSEAUDIO_FOUND)
|
|
+ add_definitions(-DHAVE_PULSEAUDIO=1)
|
|
+ message("PulseAudio found, enabling PulseAudio sound backend")
|
|
+ else()
|
|
+ add_definitions(-DHAVE_PULSEAUDIO=0)
|
|
+ message("PulseAudio NOT found, disabling PulseAudio sound backend")
|
|
+ endif(PULSEAUDIO_FOUND)
|
|
else()
|
|
add_definitions(-DHAVE_PULSEAUDIO=0)
|
|
- message("PulseAudio NOT found, disabling PulseAudio sound backend")
|
|
- endif(PULSEAUDIO_FOUND)
|
|
+ message("PulseAudio sound backend disabled")
|
|
+ endif()
|
|
|
|
- include(FindOpenAL OPTIONAL)
|
|
- if(OPENAL_FOUND)
|
|
- add_definitions(-DHAVE_OPENAL=1)
|
|
- include_directories(${OPENAL_INCLUDE_DIR})
|
|
- message("OpenAL found, enabling OpenAL sound backend")
|
|
+ if(NOT DISABLE_OPENAL)
|
|
+ include(FindOpenAL OPTIONAL)
|
|
+ if(OPENAL_FOUND)
|
|
+ add_definitions(-DHAVE_OPENAL=1)
|
|
+ include_directories(${OPENAL_INCLUDE_DIR})
|
|
+ message("OpenAL found, enabling OpenAL sound backend")
|
|
+ else()
|
|
+ add_definitions(-DHAVE_OPENAL=0)
|
|
+ message("OpenAL NOT found, disabling OpenAL sound backend")
|
|
+ endif(OPENAL_FOUND)
|
|
else()
|
|
add_definitions(-DHAVE_OPENAL=0)
|
|
- message("OpenAL NOT found, disabling OpenAL sound backend")
|
|
- endif(OPENAL_FOUND)
|
|
+ message("OpenAL sound backend disabled")
|
|
+ endif()
|
|
|
|
include(FindLLVM OPTIONAL)
|
|
if (LLVM_FOUND)
|
|
@@ -494,22 +525,28 @@
|
|
|
|
endif()
|
|
|
|
- set(CMAKE_REQUIRED_LIBRARIES portaudio)
|
|
- CHECK_CXX_SOURCE_RUNS(
|
|
- "#include <portaudio.h>
|
|
- int main(int argc, char **argv)
|
|
- { if(Pa_GetVersion() >= 1890) return 0; else return 1; }"
|
|
- PORTAUDIO)
|
|
- unset(CMAKE_REQUIRED_LIBRARIES)
|
|
- if(PORTAUDIO)
|
|
- message("PortAudio found, enabling mic support")
|
|
- add_definitions(-DHAVE_PORTAUDIO=1)
|
|
- set(PORTAUDIO_FOUND TRUE)
|
|
+ if(NOT DISABLE_PORTAUDIO)
|
|
+ set(CMAKE_REQUIRED_LIBRARIES portaudio)
|
|
+ CHECK_CXX_SOURCE_RUNS(
|
|
+ "#include <portaudio.h>
|
|
+ int main(int argc, char **argv)
|
|
+ { if(Pa_GetVersion() >= 1890) return 0; else return 1; }"
|
|
+ PORTAUDIO)
|
|
+ unset(CMAKE_REQUIRED_LIBRARIES)
|
|
+ if(PORTAUDIO)
|
|
+ message("PortAudio found, enabling mic support")
|
|
+ add_definitions(-DHAVE_PORTAUDIO=1)
|
|
+ set(PORTAUDIO_FOUND TRUE)
|
|
+ else()
|
|
+ message("PortAudio not found, disabling mic support")
|
|
+ add_definitions(-DHAVE_PORTAUDIO=0)
|
|
+ set(PORTAUDIO_FOUND FALSE)
|
|
+ endif(PORTAUDIO)
|
|
else()
|
|
- message("PortAudio not found, disabling mic support")
|
|
+ message("PortAudio disabled")
|
|
add_definitions(-DHAVE_PORTAUDIO=0)
|
|
set(PORTAUDIO_FOUND FALSE)
|
|
- endif(PORTAUDIO)
|
|
+ endif()
|
|
|
|
if(OPROFILING)
|
|
check_lib(OPROFILE "(no .pc for opagent)" opagent opagent.h)
|