diff --git a/CMakeLists.txt b/CMakeLists.txt index f9536a1f..1b8a6209 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -94,6 +94,10 @@ if (UNIX AND NOT APPLE AND NOT CYGWIN) NOT _GLFW_HAS_GLXGETPROCADDRESSARB AND NOT _GLFW_HAS_GLXGETPROCADDRESSEXT) + if (${CMAKE_SYSTEM_NAME} STREQUAL "Linux") + set(_GLFW_USE_LINUX_JOYSTICKS 1) + endif (${CMAKE_SYSTEM_NAME} STREQUAL "Linux") + # Select platform specific code add_subdirectory(src/x11) endif(UNIX AND NOT APPLE AND NOT CYGWIN) diff --git a/src/config.h.cmake b/src/config.h.cmake index c217477b..78a59fad 100644 --- a/src/config.h.cmake +++ b/src/config.h.cmake @@ -12,6 +12,9 @@ /* Define this to 1 if glXGetProcAddressEXT is available */ #cmakedefine _GLFW_HAS_GLXGETPROCADDRESSEXT 1 +/* Define this to 1 if the Linux joystick API is available */ +#cmakedefine _GLFW_USE_LINUX_JOYSTICKS 1 + /* Define this to 1 to not load gdi32.dll dynamically */ #cmakedefine _GLFW_NO_DLOAD_GDI32 1 /* Define this to 1 to not load winmm.dll dynamically */