From a5dfad784e98766fc2f19de0e514e9130c38bb9b Mon Sep 17 00:00:00 2001 From: =?utf8?q?Michal=20Mal=C3=BD?= Date: Fri, 31 Jul 2015 12:05:47 +0200 Subject: [PATCH] Build SDL2 support only when SDL2 is available. --- CMakeLists.txt | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 3ce3737..a1bd4e2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -20,7 +20,7 @@ set(CMAKE_AUTOMOC ON) set(CMAKE_AUTOUIC ON) set(CMAKE_INCLUDE_CURRENT_DIR ON) -set(FFBChecker_SRCS sdl2ffbeffectfactory.cpp sdl2ffbdevice.cpp +set(FFBChecker_SRCS conditioneffectsettings.cpp constanteffectsettings.cpp effectsettings.cpp @@ -49,8 +49,15 @@ set(FFBChecker_SRCS sdl2ffbeffectfactory.cpp sdl2ffbdevice.cpp mainwindow.cpp periodiceffectsettings.cpp rampeffectsettings.cpp - rumbleeffectsettings.cpp - sdl2deviceprober.cpp) + rumbleeffectsettings.cpp) + +if (SDL2_FOUND) + set(FFBChecker_SRCS + ${FFBChecker_SRCS} + sdl2ffbeffectfactory.cpp + sdl2ffbdevice.cpp + sdl2deviceprober.cpp) +endif() include_directories(${CMAKE_CURRENT_SOURCE_DIR}) if (SDL2_FOUND) -- 2.43.5