mirror of
https://github.com/SFML/SFML.git
synced 2024-11-28 22:31:09 +08:00
Explicitly specify required X11 components
This commit is contained in:
parent
eb162df723
commit
205794eb3f
@ -42,7 +42,7 @@ if(SFML_STATIC_LIBRARIES)
|
|||||||
list(FIND SFML_FIND_COMPONENTS "Window" FIND_SFML_WINDOW_COMPONENT_INDEX)
|
list(FIND SFML_FIND_COMPONENTS "Window" FIND_SFML_WINDOW_COMPONENT_INDEX)
|
||||||
if(FIND_SFML_WINDOW_COMPONENT_INDEX GREATER -1)
|
if(FIND_SFML_WINDOW_COMPONENT_INDEX GREATER -1)
|
||||||
if(FIND_SFML_OS_LINUX OR FIND_SFML_OS_FREEBSD)
|
if(FIND_SFML_OS_LINUX OR FIND_SFML_OS_FREEBSD)
|
||||||
find_dependency(X11)
|
find_dependency(X11 REQUIRED COMPONENTS Xrandr Xcursor)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(FIND_SFML_OS_LINUX)
|
if(FIND_SFML_OS_LINUX)
|
||||||
|
@ -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")
|
sfml_find_package(GBM INCLUDE "GBM_INCLUDE_DIR" LINK "GBM_LIBRARY")
|
||||||
target_link_libraries(sfml-window PRIVATE drm gbm EGL)
|
target_link_libraries(sfml-window PRIVATE drm gbm EGL)
|
||||||
else()
|
else()
|
||||||
find_package(X11 REQUIRED)
|
find_package(X11 REQUIRED COMPONENTS Xrandr Xcursor)
|
||||||
target_link_libraries(sfml-window PRIVATE X11::X11 X11::Xrandr X11::Xcursor)
|
target_link_libraries(sfml-window PRIVATE X11::X11 X11::Xrandr X11::Xcursor)
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
Loading…
Reference in New Issue
Block a user