mirror of
https://github.com/cjcliffe/CubicSDR.git
synced 2024-11-26 21:58:37 -05:00
add USE_SYSTEM_RTAUDIO flag, off by default
This commit is contained in:
parent
f4a60e6765
commit
d1686f9699
@ -214,19 +214,7 @@ IF (WIN32)
|
||||
ENDIF()
|
||||
ENDIF (WIN32)
|
||||
|
||||
IF (UNIX AND NOT APPLE)
|
||||
set(BUILD_DEB OFF CACHE BOOL "Build DEB")
|
||||
|
||||
SET(LIQUID_LIB liquid)
|
||||
SET(OTHER_LIBRARIES ${OTHER_LIBRARIES} dl)
|
||||
|
||||
# use the system RtAudio which in turn provides OSS, ALSA, JACK,
|
||||
# PulseAudio support depending on how it was compiled
|
||||
find_package(RtAudio)
|
||||
SET(OTHER_LIBRARIES ${OTHER_LIBRARIES} ${RTAUDIO_LIBRARIES})
|
||||
ADD_DEFINITIONS(${RTAUDIO_DEFINITIONS})
|
||||
include_directories(${RTAUDIO_INCLUDE_DIR})
|
||||
ELSE(UNIX AND NOT APPLE)
|
||||
MACRO(use_included_rtaudio)
|
||||
SET (cubicsdr_sources
|
||||
${cubicsdr_sources}
|
||||
external/rtaudio/RtAudio.cpp
|
||||
@ -237,6 +225,65 @@ ELSE(UNIX AND NOT APPLE)
|
||||
)
|
||||
SOURCE_GROUP("_ext-RTAudio" REGULAR_EXPRESSION "external/rtaudio/.*${REG_EXT}")
|
||||
include_directories(${PROJECT_SOURCE_DIR}/external/rtaudio)
|
||||
ENDMACRO(use_included_rtaudio)
|
||||
|
||||
IF (UNIX AND NOT APPLE)
|
||||
set(BUILD_DEB OFF CACHE BOOL "Build DEB")
|
||||
|
||||
SET(USE_SYSTEM_RTAUDIO OFF CACHE BOOL "Use the system RtAudio which in turn provides OSS, ALSA, JACK, PulseAudio support depending on how it was compiled")
|
||||
|
||||
SET(USE_AUDIO_PULSE ON CACHE BOOL "Use Pulse Audio")
|
||||
SET(USE_AUDIO_JACK OFF CACHE BOOL "Use Jack Audio")
|
||||
SET(USE_AUDIO_ALSA OFF CACHE BOOL "Use ALSA Audio")
|
||||
SET(USE_AUDIO_OSS OFF CACHE BOOL "Use OSS Audio")
|
||||
|
||||
SET(LIQUID_LIB liquid)
|
||||
SET(OTHER_LIBRARIES ${OTHER_LIBRARIES} dl)
|
||||
|
||||
IF(USE_SYSTEM_RTAUDIO)
|
||||
find_package(RtAudio)
|
||||
SET(OTHER_LIBRARIES ${OTHER_LIBRARIES} ${RTAUDIO_LIBRARIES})
|
||||
ADD_DEFINITIONS(${RTAUDIO_DEFINITIONS})
|
||||
include_directories(${RTAUDIO_INCLUDE_DIR})
|
||||
ELSE(USE_SYSTEM_RTAUDIO)
|
||||
use_included_rtaudio()
|
||||
|
||||
IF(USE_AUDIO_PULSE)
|
||||
SET (OTHER_LIBRARIES ${OTHER_LIBRARIES} pulse-simple pulse)
|
||||
ADD_DEFINITIONS(
|
||||
-D__LINUX_PULSE__
|
||||
)
|
||||
ENDIF(USE_AUDIO_PULSE)
|
||||
|
||||
IF(USE_AUDIO_JACK)
|
||||
find_package(Jack)
|
||||
SET (OTHER_LIBRARIES ${OTHER_LIBRARIES} ${JACK_LIBRARIES})
|
||||
ADD_DEFINITIONS(
|
||||
-D__UNIX_JACK__
|
||||
)
|
||||
include_directories(${JACK_INCLUDE_DIRS})
|
||||
ENDIF(USE_AUDIO_JACK)
|
||||
|
||||
IF(USE_AUDIO_ALSA)
|
||||
SET (OTHER_LIBRARIES ${OTHER_LIBRARIES} asound)
|
||||
set(ALSA_INCLUDE_DIR "/usr/include" CACHE FILEPATH "ALSA include path")
|
||||
include_directories(${ALSA_INCLUDE_DIR})
|
||||
set(ALSA_LIB_DIR "/usr/lib" CACHE FILEPATH "ALSA lib path")
|
||||
link_directories(${ALSA_LIB_DIR})
|
||||
ADD_DEFINITIONS(
|
||||
-D__LINUX_ALSA__
|
||||
)
|
||||
ENDIF(USE_AUDIO_ALSA)
|
||||
|
||||
IF(USE_AUDIO_OSS)
|
||||
SET (OTHER_LIBRARIES ${OTHER_LIBRARIES} oss)
|
||||
ADD_DEFINITIONS(
|
||||
-D__LINUX_OSS__
|
||||
)
|
||||
ENDIF(USE_AUDIO_OSS)
|
||||
ENDIF(USE_SYSTEM_RTAUDIO)
|
||||
ELSE(UNIX AND NOT APPLE)
|
||||
use_included_rtaudio()
|
||||
ENDIF(UNIX AND NOT APPLE)
|
||||
|
||||
IF (APPLE)
|
||||
@ -258,6 +305,7 @@ ENDIF (APPLE)
|
||||
|
||||
|
||||
SET (cubicsdr_sources
|
||||
${cubicsdr_sources}
|
||||
src/CubicSDR.cpp
|
||||
src/AppFrame.cpp
|
||||
src/AppConfig.cpp
|
||||
@ -357,6 +405,7 @@ IF(ENABLE_DIGITAL_LAB)
|
||||
ENDIF()
|
||||
|
||||
SET (cubicsdr_headers
|
||||
${cubicsdr_headers}
|
||||
src/CubicSDRDefs.h
|
||||
src/CubicSDR.h
|
||||
src/AppFrame.h
|
||||
|
Loading…
Reference in New Issue
Block a user