From f5d4475efc1a54400a8e75710317f5de1b1a68b5 Mon Sep 17 00:00:00 2001 From: Newbyte Date: Fri, 23 Oct 2020 12:23:43 +0200 Subject: [PATCH] Fix build when SDL2 is built with DirectFB support --- CMakeLists.txt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 93d75eb57..d0e688e1c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -304,6 +304,12 @@ if (NOT SERVER_ONLY) include_directories("${SDL2_INCLUDEDIR}") MESSAGE(STATUS "Use system SDL2: ${SDL2_LIBRARY}") endif() + # DirectFB. Necessary if system SDL2 is built with DirectFB support. + find_path(DIRECTFB_INCLUDEDIR NAMES directfb.h directfb++.h PATH_SUFFIXES directfb include/directfb include PATHS) + if (DIRECTFB_INCLUDEDIR) + include_directories("${DIRECTFB_INCLUDEDIR}") + message(STATUS "Adding DirectFB include directories for DirectFB support in SDL2") + endif() endif() # Build the irrlicht library