From: Michal MalĂ˝ Date: Fri, 31 Jul 2015 10:05:47 +0000 (+0200) Subject: Build SDL2 support only when SDL2 is available. X-Git-Url: https://gitweb.devoid-pointer.net/?a=commitdiff_plain;h=a5dfad784e98766fc2f19de0e514e9130c38bb9b;p=FFBChecker.git Build SDL2 support only when SDL2 is available. --- 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)