Skip to content

Commit 2081648

Browse files
committed
Don't use udev on FreeBSD
1 parent 3a7b425 commit 2081648

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

src/SFML/Window/CMakeLists.txt

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,8 @@ if(NOT SFML_OPENGL_ES)
196196
message(FATAL_ERROR "Xrandr library not found")
197197
endif()
198198
include_directories(${X11_INCLUDE_DIR})
199+
endif()
200+
if(SFML_OS_LINUX)
199201
find_package(UDev REQUIRED)
200202
if(NOT UDEV_FOUND)
201203
message(FATAL_ERROR "udev library not found")
@@ -212,11 +214,10 @@ endif()
212214
# build the list of external libraries to link
213215
if(SFML_OS_WINDOWS)
214216
list(APPEND WINDOW_EXT_LIBS winmm gdi32)
215-
elseif(SFML_OS_LINUX OR SFML_OS_FREEBSD)
217+
elseif(SFML_OS_LINUX)
216218
list(APPEND WINDOW_EXT_LIBS ${X11_X11_LIB} ${X11_Xrandr_LIB} ${UDEV_LIBRARIES})
217-
if(SFML_OS_FREEBSD)
218-
list(APPEND WINDOW_EXT_LIBS usbhid)
219-
endif()
219+
elseif(SFML_OS_FREEBSD)
220+
list(APPEND WINDOW_EXT_LIBS ${X11_X11_LIB} ${X11_Xrandr_LIB} usbhid)
220221
elseif(SFML_OS_MACOSX)
221222
list(APPEND WINDOW_EXT_LIBS "-framework Foundation -framework AppKit -framework IOKit -framework Carbon")
222223
elseif(SFML_OS_IOS)

0 commit comments

Comments
 (0)