diff --git a/CMakeLists.txt b/CMakeLists.txt index e4db9ca94..313ee4c9e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -295,11 +295,13 @@ if (NOT SERVER_ONLY) # SDL2 find_library(SDL2_LIBRARY NAMES SDL2 libSDL2) find_path(SDL2_INCLUDEDIR NAMES SDL.h PATH_SUFFIXES SDL2 include/SDL2 include PATHS) + find_path(DIRECTFB_INCLUDEDIR NAMES directfb.h directfb++.h PATH_SUFFIXES directfb include/directfb include PATHS) if (NOT SDL2_LIBRARY OR NOT SDL2_INCLUDEDIR) message(FATAL_ERROR "SDL2 not found. " "SDL2 is required to handle gamepad in SuperTuxKart.") else() - include_directories("${SDL2_INCLUDEDIR}") + include_directories(${SDL2_INCLUDEDIR}) + include_directories(${DIRECTFB_INCLUDEDIR}) MESSAGE(STATUS "Use system SDL2: ${SDL2_LIBRARY}") endif() endif()