mirror of
https://github.com/SFML/SFML.git
synced 2024-11-29 06:41:05 +08:00
commit
597d133dcb
@ -165,6 +165,10 @@ if(SFML_OS_MACOSX)
|
|||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(SFML_OS_LINUX OR SFML_OS_FREEBSD)
|
if(SFML_OS_LINUX OR SFML_OS_FREEBSD)
|
||||||
|
set(PKGCONFIG_DIR lib${LIB_SUFFIX}/pkgconfig)
|
||||||
|
if(SFML_OS_FREEBSD)
|
||||||
|
set(PKGCONFIG_DIR libdata/pkgconfig)
|
||||||
|
endif()
|
||||||
if(BUILD_SHARED_LIBS)
|
if(BUILD_SHARED_LIBS)
|
||||||
sfml_set_option(SFML_INSTALL_PKGCONFIG_FILES FALSE BOOL "TRUE to automatically install pkg-config files so other projects can find SFML")
|
sfml_set_option(SFML_INSTALL_PKGCONFIG_FILES FALSE BOOL "TRUE to automatically install pkg-config files so other projects can find SFML")
|
||||||
if(SFML_INSTALL_PKGCONFIG_FILES)
|
if(SFML_INSTALL_PKGCONFIG_FILES)
|
||||||
@ -174,7 +178,7 @@ if(SFML_OS_LINUX OR SFML_OS_FREEBSD)
|
|||||||
"tools/pkg-config/sfml-${sfml_module}.pc"
|
"tools/pkg-config/sfml-${sfml_module}.pc"
|
||||||
@ONLY)
|
@ONLY)
|
||||||
INSTALL(FILES "${CMAKE_CURRENT_BINARY_DIR}/tools/pkg-config/sfml-${sfml_module}.pc"
|
INSTALL(FILES "${CMAKE_CURRENT_BINARY_DIR}/tools/pkg-config/sfml-${sfml_module}.pc"
|
||||||
DESTINATION "${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX}/pkgconfig")
|
DESTINATION "${CMAKE_INSTALL_PREFIX}/${PKGCONFIG_DIR}")
|
||||||
endforeach()
|
endforeach()
|
||||||
endif()
|
endif()
|
||||||
else()
|
else()
|
||||||
|
@ -196,6 +196,8 @@ if(NOT SFML_OPENGL_ES)
|
|||||||
message(FATAL_ERROR "Xrandr library not found")
|
message(FATAL_ERROR "Xrandr library not found")
|
||||||
endif()
|
endif()
|
||||||
include_directories(${X11_INCLUDE_DIR})
|
include_directories(${X11_INCLUDE_DIR})
|
||||||
|
endif()
|
||||||
|
if(SFML_OS_LINUX)
|
||||||
find_package(UDev REQUIRED)
|
find_package(UDev REQUIRED)
|
||||||
if(NOT UDEV_FOUND)
|
if(NOT UDEV_FOUND)
|
||||||
message(FATAL_ERROR "udev library not found")
|
message(FATAL_ERROR "udev library not found")
|
||||||
@ -212,11 +214,10 @@ endif()
|
|||||||
# build the list of external libraries to link
|
# build the list of external libraries to link
|
||||||
if(SFML_OS_WINDOWS)
|
if(SFML_OS_WINDOWS)
|
||||||
list(APPEND WINDOW_EXT_LIBS winmm gdi32)
|
list(APPEND WINDOW_EXT_LIBS winmm gdi32)
|
||||||
elseif(SFML_OS_LINUX OR SFML_OS_FREEBSD)
|
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_LIBRARIES})
|
||||||
if(SFML_OS_FREEBSD)
|
elseif(SFML_OS_FREEBSD)
|
||||||
list(APPEND WINDOW_EXT_LIBS usbhid)
|
list(APPEND WINDOW_EXT_LIBS ${X11_X11_LIB} ${X11_Xrandr_LIB} usbhid)
|
||||||
endif()
|
|
||||||
elseif(SFML_OS_MACOSX)
|
elseif(SFML_OS_MACOSX)
|
||||||
list(APPEND WINDOW_EXT_LIBS "-framework Foundation -framework AppKit -framework IOKit -framework Carbon")
|
list(APPEND WINDOW_EXT_LIBS "-framework Foundation -framework AppKit -framework IOKit -framework Carbon")
|
||||||
elseif(SFML_OS_IOS)
|
elseif(SFML_OS_IOS)
|
||||||
|
@ -35,7 +35,7 @@
|
|||||||
|
|
||||||
#include <SFML/Window/Win32/SensorImpl.hpp>
|
#include <SFML/Window/Win32/SensorImpl.hpp>
|
||||||
|
|
||||||
#elif defined(SFML_SYSTEM_LINUX)
|
#elif defined(SFML_SYSTEM_LINUX) || defined(SFML_SYSTEM_FREEBSD)
|
||||||
|
|
||||||
#include <SFML/Window/Unix/SensorImpl.hpp>
|
#include <SFML/Window/Unix/SensorImpl.hpp>
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user