From 9da895da8baae8d82bf2c870a50f987a03fd8f18 Mon Sep 17 00:00:00 2001 From: David Carlier Date: Sat, 7 Apr 2018 21:27:04 +0100 Subject: [PATCH] further changes --- CMakeLists.txt | 2 +- cmake/Config.cmake | 9 --------- include/SFML/Config.hpp | 1 + src/SFML/Window/CMakeLists.txt | 2 +- src/SFML/Window/JoystickImpl.hpp | 6 +++++- src/SFML/Window/OpenBSD/JoystickImpl.hpp | 2 +- 6 files changed, 9 insertions(+), 13 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 26c5f981..aca57ad6 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -143,7 +143,7 @@ endif() # For miscellaneous files if(SFML_OS_WINDOWS OR SFML_OS_IOS) set(DEFAULT_INSTALL_MISC_DIR .) -elseif(SFML_OS_LINUX OR SFML_OS_FREEBSD) +elseif(SFML_OS_LINUX OR SFML_OS_FREEBSD OR SFML_OS_OPENBSD) set(DEFAULT_INSTALL_MISC_DIR share/SFML) elseif(SFML_OS_MACOSX) set(DEFAULT_INSTALL_MISC_DIR /usr/local/share/SFML) diff --git a/cmake/Config.cmake b/cmake/Config.cmake index 78445043..82a094cd 100644 --- a/cmake/Config.cmake +++ b/cmake/Config.cmake @@ -121,12 +121,3 @@ else() message(FATAL_ERROR "Unsupported compiler") return() endif() - -# define the install directory for miscellaneous files -if(SFML_OS_WINDOWS OR SFML_OS_IOS) - set(INSTALL_MISC_DIR .) -elseif(SFML_OS_LINUX OR SFML_OS_FREEBSD OR SFML_OS_MACOSX OR SFML_OS_OPENBSD) - set(INSTALL_MISC_DIR share/SFML) -elseif(SFML_OS_ANDROID) - set(INSTALL_MISC_DIR ${ANDROID_NDK}/sources/sfml) -endif() diff --git a/include/SFML/Config.hpp b/include/SFML/Config.hpp index 659f4a76..70a6929b 100644 --- a/include/SFML/Config.hpp +++ b/include/SFML/Config.hpp @@ -85,6 +85,7 @@ // FreeBSD #define SFML_SYSTEM_FREEBSD + #elif defined(__OpenBSD__) // OpenBSD diff --git a/src/SFML/Window/CMakeLists.txt b/src/SFML/Window/CMakeLists.txt index 6e4e542c..916c1dcd 100644 --- a/src/SFML/Window/CMakeLists.txt +++ b/src/SFML/Window/CMakeLists.txt @@ -265,7 +265,7 @@ if(SFML_OS_LINUX) target_link_libraries(sfml-window PRIVATE UDev) elseif(SFML_OS_WINDOWS) target_link_libraries(sfml-window PRIVATE winmm gdi32) -elseif(SFML_OS_FREEBSD OR SFML_OS_OPENBSD) +elseif(SFML_OS_FREEBSD) target_link_libraries(sfml-window PRIVATE usbhid) elseif(SFML_OS_MACOSX) target_link_libraries(sfml-window PRIVATE "-framework Foundation" "-framework AppKit" "-framework IOKit" "-framework Carbon") diff --git a/src/SFML/Window/JoystickImpl.hpp b/src/SFML/Window/JoystickImpl.hpp index b47d5aa8..e4fd7e2d 100644 --- a/src/SFML/Window/JoystickImpl.hpp +++ b/src/SFML/Window/JoystickImpl.hpp @@ -90,6 +90,10 @@ struct JoystickState #include +#elif defined(SFML_SYSTEM_OPENBSD) + + #include + #elif defined(SFML_SYSTEM_MACOS) #include @@ -98,7 +102,7 @@ struct JoystickState #include -#elif defined(SFML_SYSTEM_ANDROID) || defined(SFML_SYSTEM_OPENBSD) +#elif defined(SFML_SYSTEM_ANDROID) #include diff --git a/src/SFML/Window/OpenBSD/JoystickImpl.hpp b/src/SFML/Window/OpenBSD/JoystickImpl.hpp index 8e67d7a3..af7ef5c7 100644 --- a/src/SFML/Window/OpenBSD/JoystickImpl.hpp +++ b/src/SFML/Window/OpenBSD/JoystickImpl.hpp @@ -31,7 +31,7 @@ namespace sf namespace priv { //////////////////////////////////////////////////////////// -/// \brief Android implementation of joysticks +/// \brief OpenBSD implementation of joysticks /// //////////////////////////////////////////////////////////// class JoystickImpl