From d9a3cfd627f91230e5348d79fc7d11149ecdbe9c Mon Sep 17 00:00:00 2001 From: "J.A. de Jong - Redu-Sone B.V., ASCEE V.O.F" Date: Thu, 15 Jun 2023 09:57:06 +0200 Subject: [PATCH] Made default preset for compiled in DAQ backends in CMakeLists --- CMakeLists.txt | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index ae28946..382904d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -6,12 +6,26 @@ set(CMAKE_CXX_STANDARD 17) set(CMAKE_CXX_STANDARD_REQUIRED) option(LASP_DOUBLE_PRECISION "Compile as double precision floating point" ON) -option(LASP_HAS_RTAUDIO "Compile with RtAudio Daq backend" OFF) -option(LASP_HAS_PORTAUDIO "Compile with PortAudio Daq backend" ON) + +# Setting defaults for PortAudio and RtAudio backend, depending on Linux / +# Windows. +if(WIN32) + set(DEFAULT_RTAUDIO OFF) + set(DEFAULT_PORTAUDIO ON) + set(DEFAULT_ULDAQ OFF) +else() + set(DEFAULT_RTAUDIO ON) + set(DEFAULT_PORTAUDIO OFF) + set(DEFAULT_ULDAQ ON) +endif() + + +option(LASP_HAS_RTAUDIO "Compile with RtAudio Daq backend" ${DEFAULT_RTAUDIO}) +option(LASP_HAS_PORTAUDIO "Compile with PortAudio Daq backend" ${DEFAULT_PORTAUDIO}) if(LASP_HAS_PORTAUDIO AND LASP_HAS_RTAUDIO) message(FATAL_ERROR "Either PortAudio or RtAudio can be selected as audio backend") endif() -option(LASP_HAS_ULDAQ "Compile with UlDaq backend" ON) +option(LASP_HAS_ULDAQ "Compile with UlDaq backend" ${DEFAULT_ULDAQ}) option(LASP_BUILD_TUNED "Tune build for current machine (Experimental / untested)" OFF) option(LASP_WITH_OPENMP "Use OpenMP parallelization (Experimental: crashes SHOULD BE EXPECTED)" OFF) set(LASP_MAX_NFFT "33554432" CACHE STRING "Max FFT size")