From 56dc2f94ce34a78d26ba71f675e4056d9819ada0 Mon Sep 17 00:00:00 2001 From: Max Paperno Date: Tue, 17 Jan 2017 13:49:12 -0500 Subject: [PATCH] [build] Only add SIMU_AUDIO option if SDL was found, and turn it ON by default. (#4248) --- radio/src/CMakeLists.txt | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/radio/src/CMakeLists.txt b/radio/src/CMakeLists.txt index 3652962a7..67f920fd3 100644 --- a/radio/src/CMakeLists.txt +++ b/radio/src/CMakeLists.txt @@ -29,7 +29,9 @@ option(AUTOSOURCE "Automatic source detection in menus" ON) option(AUTOSWITCH "Automatic switch detection in menus" ON) option(JITTER_MEASURE "Enable ADC jitter measurement" OFF) option(WATCHDOG_DISABLED "Disable hardware Watchdog" OFF) -option(SIMU_AUDIO "Enable simulator audio" OFF) +if(SDL_FOUND) + option(SIMU_AUDIO "Enable simulator audio." ON) +endif() option(SIMU_DISKIO "Enable disk IO simulation in simulator. Simulator will use FatFs module and simulated IO layer that uses \"./sdcard.image\" file as image of SD card. This file must contain whole SD card from first to last sector" OFF) option(SIMU_LUA_COMPILER "Pre-compile and save Lua scripts in simulator." ON) option(FAS_PROTOTYPE "Support of old FAS prototypes (different resistors)" OFF) @@ -470,7 +472,7 @@ if(NOT MSVC) set(CMAKE_C_COMPILER avr-gcc) set(CMAKE_CXX_COMPILER avr-gcc) - + set(COMMON_FLAGS "-mmcu=${MCU} -DF_CPU=16000000UL -O${OPT} -gdwarf-2 -fno-exceptions -flto -fwhole-program -fno-inline-small-functions -mstrict-X ${WARNING_FLAGS}") set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${COMMON_FLAGS}") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${COMMON_FLAGS}")