Merge pull request #1362 from Chiitoo/automagic
cmake: Use less automagic during configure
This commit is contained in:
@@ -1,13 +1,23 @@
|
||||
project(obs-filters)
|
||||
|
||||
find_package(Libspeexdsp QUIET)
|
||||
if(LIBSPEEXDSP_FOUND)
|
||||
set(obs-filters_LIBSPEEXDSP_SOURCES
|
||||
noise-suppress-filter.c)
|
||||
set(obs-filters_LIBSPEEXDSP_LIBRARIES
|
||||
${LIBSPEEXDSP_LIBRARIES})
|
||||
option(DISABLE_SPEEXDSP "Disable building of the SpeexDSP-based Noise Suppression filter" OFF)
|
||||
|
||||
if(DISABLE_SPEEXDSP)
|
||||
message(STATUS "SpeexDSP support disabled")
|
||||
set(LIBSPEEXDSP_FOUND FALSE)
|
||||
else()
|
||||
message(STATUS "Speexdsp library not found, speexdsp filters disabled")
|
||||
find_package(Libspeexdsp QUIET)
|
||||
|
||||
if(NOT LIBSPEEXDSP_FOUND)
|
||||
message(STATUS "SpeexDSP support not found")
|
||||
set(LIBSPEEXDSP_FOUND FALSE)
|
||||
else()
|
||||
message(STATUS "SpeexDSP supported")
|
||||
set(obs-filters_LIBSPEEXDSP_SOURCES
|
||||
noise-suppress-filter.c)
|
||||
set(obs-filters_LIBSPEEXDSP_LIBRARIES
|
||||
${LIBSPEEXDSP_LIBRARIES})
|
||||
endif()
|
||||
endif()
|
||||
|
||||
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/obs-filters-config.h.in"
|
||||
|
Reference in New Issue
Block a user