Skip to content

Commit

Permalink
cmake: add X11 include dir to check dirs
Browse files Browse the repository at this point in the history
  • Loading branch information
madebr committed Nov 24, 2022
1 parent 192cdf3 commit e426617
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions cmake/sdlchecks.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -400,6 +400,7 @@ endmacro()
# - SDL_X11_SHARED opt
# - HAVE_SDL_LOADSO opt
macro(CheckX11)
cmake_push_check_state(RESET)
if(SDL_X11)
foreach(_LIB X11 Xext Xcursor Xi Xfixes Xrandr Xrender Xss)
FindLibraryAndSONAME("${_LIB}")
Expand All @@ -422,6 +423,7 @@ macro(CheckX11)

if(X_INCLUDEDIR)
list(APPEND EXTRA_CFLAGS "-I${X_INCLUDEDIR}")
list(APPEND CMAKE_REQUIRED_INCLUDES ${X_INCLUDEDIR})
endif()

find_file(HAVE_XCURSOR_H NAMES "X11/Xcursor/Xcursor.h" HINTS "${X_INCLUDEDIR}")
Expand Down Expand Up @@ -597,6 +599,7 @@ macro(CheckX11)
# Prevent Mesa from including X11 headers
list(APPEND EXTRA_CFLAGS "-DMESA_EGL_NO_X11_HEADERS -DEGL_NO_X11")
endif()
cmake_pop_check_state()
endmacro()

macro(WaylandProtocolGen _SCANNER _CODE_MODE _XML _PROTL)
Expand Down

0 comments on commit e426617

Please sign in to comment.