add x11 dependencies

This commit is contained in:
Bayemite 2021-06-07 19:46:03 +10:00
parent 3c44229af8
commit 377054de3f
2 changed files with 8 additions and 0 deletions

View File

@ -18,6 +18,7 @@ matrix:
- libxcursor-dev - libxcursor-dev
- libxi-dev - libxi-dev
- libxext-dev - libxext-dev
- libx11-dev
env: env:
- BUILD_SHARED_LIBS=ON - BUILD_SHARED_LIBS=ON
- CFLAGS=-Werror - CFLAGS=-Werror
@ -32,6 +33,7 @@ matrix:
- libxcursor-dev - libxcursor-dev
- libxi-dev - libxi-dev
- libxext-dev - libxext-dev
- libx11-dev
env: env:
- BUILD_SHARED_LIBS=OFF - BUILD_SHARED_LIBS=OFF
- CFLAGS=-Werror - CFLAGS=-Werror

View File

@ -158,6 +158,10 @@ if (_GLFW_X11)
# Set up library and include paths # Set up library and include paths
list(APPEND glfw_INCLUDE_DIRS "${X11_X11_INCLUDE_PATH}") list(APPEND glfw_INCLUDE_DIRS "${X11_X11_INCLUDE_PATH}")
if (NOT X11_X11_INCLUDE_PATH)
message(FATAL_ERROR "X111 headers not found; install libx11 development package")
endif()
# Check for XRandR (modern resolution switching and gamma control) # Check for XRandR (modern resolution switching and gamma control)
if (NOT X11_Xrandr_INCLUDE_PATH) if (NOT X11_Xrandr_INCLUDE_PATH)
message(FATAL_ERROR "RandR headers not found; install libxrandr development package") message(FATAL_ERROR "RandR headers not found; install libxrandr development package")
@ -187,6 +191,8 @@ if (_GLFW_X11)
if (NOT X11_Xshape_INCLUDE_PATH) if (NOT X11_Xshape_INCLUDE_PATH)
message(FATAL_ERROR "X Shape headers not found; install libxext development package") message(FATAL_ERROR "X Shape headers not found; install libxext development package")
endif() endif()
list(APPEND glfw_LIBRARIES ${X11_X11_LIB})
endif() endif()
#-------------------------------------------------------------------- #--------------------------------------------------------------------