From a559b5da9800083ec4c8d31c02a7c606c198c350 Mon Sep 17 00:00:00 2001 From: Camilla Berglund Date: Thu, 3 Nov 2011 02:43:10 +0100 Subject: [PATCH] Added rudimentary detection of librt. --- CMakeLists.txt | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 3f5f6d3e..fad2f423 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -89,6 +89,11 @@ if (UNIX AND NOT APPLE) NOT _GLFW_HAS_GLXGETPROCADDRESSARB AND NOT _GLFW_HAS_GLXGETPROCADDRESSEXT) + find_library(LIBRT rt) + if (LIBRT) + list(APPEND GLFW_LIBRARIES ${LIBRT}) + endif(LIBRT) + if (${CMAKE_SYSTEM_NAME} STREQUAL "Linux") set(_GLFW_USE_LINUX_JOYSTICKS 1) endif (${CMAKE_SYSTEM_NAME} STREQUAL "Linux")