1
0
Fork 0
mirror of https://github.com/gwm17/glfw.git synced 2024-11-23 02:38:52 -05:00

X11: Add extension header paths to CMake target

The way the X11 find module is written, these paths can differ from the
base X11 header path, even if they very rarely do.

Fixes #1999
This commit is contained in:
Camilla Löwy 2021-12-09 19:35:15 +01:00
parent cd01187b9d
commit 900848ad0c

View File

@ -194,31 +194,37 @@ if (GLFW_BUILD_X11)
if (NOT X11_Xrandr_INCLUDE_PATH)
message(FATAL_ERROR "RandR headers not found; install libxrandr development package")
endif()
target_include_directories(glfw PRIVATE "${X11_Xrandr_INCLUDE_PATH}")
# Check for Xinerama (legacy multi-monitor support)
if (NOT X11_Xinerama_INCLUDE_PATH)
message(FATAL_ERROR "Xinerama headers not found; install libxinerama development package")
endif()
target_include_directories(glfw PRIVATE "${X11_Xinerama_INCLUDE_PATH}")
# Check for Xkb (X keyboard extension)
if (NOT X11_Xkb_INCLUDE_PATH)
message(FATAL_ERROR "XKB headers not found; install X11 development package")
endif()
target_include_directories(glfw PRIVATE "${X11_Xkb_INCLUDE_PATH}")
# Check for Xcursor (cursor creation from RGBA images)
if (NOT X11_Xcursor_INCLUDE_PATH)
message(FATAL_ERROR "Xcursor headers not found; install libxcursor development package")
endif()
target_include_directories(glfw PRIVATE "${X11_Xcursor_INCLUDE_PATH}")
# Check for XInput (modern HID input)
if (NOT X11_Xi_INCLUDE_PATH)
message(FATAL_ERROR "XInput headers not found; install libxi development package")
endif()
target_include_directories(glfw PRIVATE "${X11_Xi_INCLUDE_PATH}")
# Check for X Shape (custom window input shape)
if (NOT X11_Xshape_INCLUDE_PATH)
message(FATAL_ERROR "X Shape headers not found; install libxext development package")
endif()
target_include_directories(glfw PRIVATE "${X11_Xshape_INCLUDE_PATH}")
endif()
if (UNIX AND NOT APPLE)