From 205794eb3fc495ffc4f1bdad9d8243902d67e1ed Mon Sep 17 00:00:00 2001 From: kimci86 Date: Tue, 7 Feb 2023 22:13:35 +0100 Subject: [PATCH] Explicitly specify required X11 components --- cmake/SFMLConfigDependencies.cmake.in | 2 +- src/SFML/Window/CMakeLists.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/cmake/SFMLConfigDependencies.cmake.in b/cmake/SFMLConfigDependencies.cmake.in index b816477d3..1e50fd2d5 100644 --- a/cmake/SFMLConfigDependencies.cmake.in +++ b/cmake/SFMLConfigDependencies.cmake.in @@ -42,7 +42,7 @@ if(SFML_STATIC_LIBRARIES) list(FIND SFML_FIND_COMPONENTS "Window" FIND_SFML_WINDOW_COMPONENT_INDEX) if(FIND_SFML_WINDOW_COMPONENT_INDEX GREATER -1) if(FIND_SFML_OS_LINUX OR FIND_SFML_OS_FREEBSD) - find_dependency(X11) + find_dependency(X11 REQUIRED COMPONENTS Xrandr Xcursor) endif() if(FIND_SFML_OS_LINUX) diff --git a/src/SFML/Window/CMakeLists.txt b/src/SFML/Window/CMakeLists.txt index 4359c0914..7b4c6e78f 100644 --- a/src/SFML/Window/CMakeLists.txt +++ b/src/SFML/Window/CMakeLists.txt @@ -285,7 +285,7 @@ if(SFML_OS_LINUX OR SFML_OS_FREEBSD OR SFML_OS_OPENBSD OR SFML_OS_NETBSD) sfml_find_package(GBM INCLUDE "GBM_INCLUDE_DIR" LINK "GBM_LIBRARY") target_link_libraries(sfml-window PRIVATE drm gbm EGL) else() - find_package(X11 REQUIRED) + find_package(X11 REQUIRED COMPONENTS Xrandr Xcursor) target_link_libraries(sfml-window PRIVATE X11::X11 X11::Xrandr X11::Xcursor) endif() endif()