]> Devoid-pointer.net GitWeb - FFBChecker.git/commitdiff
Build SDL2 support only when SDL2 is available.
authorMichal Malý <madcatxster@devoid-pointer.net>
Fri, 31 Jul 2015 10:05:47 +0000 (12:05 +0200)
committerMichal Malý <madcatxster@devoid-pointer.net>
Fri, 31 Jul 2015 10:05:47 +0000 (12:05 +0200)
CMakeLists.txt

index 3ce373741af31765862d54d14e259d65984d2db6..a1bd4e27002f3878e4a49cea2b98e89aac9778f7 100644 (file)
@@ -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)