Added CMake find module for udev library
This commit is contained in:
parent
6b2a4c27db
commit
185c09a95c
2 changed files with 59 additions and 1 deletions
|
@ -129,6 +129,12 @@ if(SFML_OS_LINUX)
|
|||
message(FATAL_ERROR "Xrandr library not found")
|
||||
endif()
|
||||
include_directories(${X11_INCLUDE_DIR})
|
||||
|
||||
find_package(UDev REQUIRED)
|
||||
if(NOT UDEV_FOUND)
|
||||
message(FATAL_ERROR "udev library not found")
|
||||
endif()
|
||||
include_directories(${UDEV_INCLUDE_DIR})
|
||||
endif()
|
||||
|
||||
# build the list of external libraries to link
|
||||
|
@ -136,7 +142,7 @@ set(WINDOW_EXT_LIBS ${OPENGL_gl_LIBRARY})
|
|||
if(SFML_OS_WINDOWS)
|
||||
set(WINDOW_EXT_LIBS ${WINDOW_EXT_LIBS} winmm gdi32)
|
||||
elseif(SFML_OS_LINUX OR SFML_OS_FREEBSD)
|
||||
set(WINDOW_EXT_LIBS ${WINDOW_EXT_LIBS} ${X11_X11_LIB} ${X11_Xrandr_LIB} udev)
|
||||
set(WINDOW_EXT_LIBS ${WINDOW_EXT_LIBS} ${X11_X11_LIB} ${X11_Xrandr_LIB} ${UDEV_LIBRARIES})
|
||||
if(SFML_OS_FREEBSD)
|
||||
set(WINDOW_EXT_LIBS ${WINDOW_EXT_LIBS} usbhid)
|
||||
endif()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue