Reworked the UDev inclusion

* This fixes `SFML_DEPENDENCIES` missing the UDev library for static builds (issue #728).
This commit is contained in:
Mario Liebisch 2014-10-30 10:53:50 +01:00 committed by Lukas Dürrenberger
parent c2761c317e
commit 1271dff960
2 changed files with 12 additions and 8 deletions

View file

@ -281,6 +281,7 @@ if(SFML_STATIC_LIBRARIES)
if(FIND_SFML_OS_LINUX)
find_sfml_dependency(X11_LIBRARY "X11" X11)
find_sfml_dependency(XRANDR_LIBRARY "Xrandr" Xrandr)
find_sfml_dependency(UDEV_LIBRARY "UDev" udev)
endif()
# update the list
@ -290,6 +291,8 @@ if(SFML_STATIC_LIBRARIES)
set(SFML_WINDOW_DEPENDENCIES ${SFML_WINDOW_DEPENDENCIES} "GL" ${X11_LIBRARY} ${XRANDR_LIBRARY})
if(FIND_SFML_OS_FREEBSD)
set(SFML_WINDOW_DEPENDENCIES ${SFML_WINDOW_DEPENDENCIES} "usbhid")
else()
set(SFML_WINDOW_DEPENDENCIES ${SFML_WINDOW_DEPENDENCIES} ${UDEV_LIBRARY})
endif()
elseif(FIND_SFML_OS_MACOSX)
set(SFML_WINDOW_DEPENDENCIES ${SFML_WINDOW_DEPENDENCIES} "-framework OpenGL -framework Foundation -framework AppKit -framework IOKit -framework Carbon")