diff --git a/cmake/SFMLConfigDependencies.cmake.in b/cmake/SFMLConfigDependencies.cmake.in index c5813bd64..0737ec5da 100644 --- a/cmake/SFMLConfigDependencies.cmake.in +++ b/cmake/SFMLConfigDependencies.cmake.in @@ -10,6 +10,10 @@ if(SFML_STATIC_LIBRARIES) set(FIND_SFML_OS_WINDOWS 1) elseif(${CMAKE_SYSTEM_NAME} MATCHES "Linux") set(FIND_SFML_OS_LINUX 1) + + if(@SFML_USE_DRM@) + set(FIND_SFML_USE_DRM 1) + endif() elseif(${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD") set(FIND_SFML_OS_FREEBSD 1) elseif(${CMAKE_SYSTEM_NAME} MATCHES "Darwin") @@ -44,7 +48,10 @@ if(SFML_STATIC_LIBRARIES) # sfml-window 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) + if(FIND_SFML_USE_DRM) + sfml_bind_dependency(TARGET DRM FRIENDLY_NAME "drm" SEARCH_NAMES "drm") + sfml_bind_dependency(TARGET GBM FRIENDLY_NAME "gbm" SEARCH_NAMES "gbm") + elseif(FIND_SFML_OS_LINUX OR FIND_SFML_OS_FREEBSD) sfml_bind_dependency(TARGET X11 FRIENDLY_NAME "X11" SEARCH_NAMES "X11") sfml_bind_dependency(TARGET X11 FRIENDLY_NAME "Xrandr" SEARCH_NAMES "Xrandr") sfml_bind_dependency(TARGET X11 FRIENDLY_NAME "Xcursor" SEARCH_NAMES "Xcursor")