Reworked the UDev inclusion
* This fixes `SFML_DEPENDENCIES` missing the UDev library for static builds (issue #728).
This commit is contained in:
parent
c2761c317e
commit
1271dff960
2 changed files with 12 additions and 8 deletions
|
@ -199,25 +199,26 @@ if(NOT SFML_OPENGL_ES)
|
|||
endif()
|
||||
include_directories(${X11_INCLUDE_DIR})
|
||||
endif()
|
||||
if(SFML_OS_LINUX)
|
||||
find_package(UDev REQUIRED)
|
||||
if(NOT UDEV_FOUND)
|
||||
message(FATAL_ERROR "udev library not found")
|
||||
endif()
|
||||
include_directories(${UDEV_INCLUDE_DIR})
|
||||
endif()
|
||||
endif()
|
||||
if(SFML_OPENGL_ES AND SFML_OS_LINUX)
|
||||
find_package(EGL REQUIRED)
|
||||
find_package(GLES REQUIRED)
|
||||
include_directories(${EGL_INCLUDE_DIR} ${GLES_INCLUDE_DIR})
|
||||
endif()
|
||||
if(SFML_OS_LINUX)
|
||||
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
|
||||
if(SFML_OS_WINDOWS)
|
||||
list(APPEND WINDOW_EXT_LIBS winmm gdi32)
|
||||
elseif(SFML_OS_LINUX)
|
||||
list(APPEND WINDOW_EXT_LIBS ${X11_X11_LIB} ${X11_Xrandr_LIB} ${UDEV_LIBRARIES})
|
||||
list(APPEND WINDOW_EXT_LIBS ${X11_X11_LIB} ${X11_Xrandr_LIB} ${UDEV_LIBRARY})
|
||||
elseif(SFML_OS_FREEBSD)
|
||||
list(APPEND WINDOW_EXT_LIBS ${X11_X11_LIB} ${X11_Xrandr_LIB} usbhid)
|
||||
elseif(SFML_OS_MACOSX)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue