diff options
author | Brad Davis <[email protected]> | 2013-10-25 16:59:58 -0700 |
---|---|---|
committer | Brad Davis <[email protected]> | 2013-10-25 16:59:58 -0700 |
commit | b6b7f06322f958e152ffa2daab1c6be0d7ab2e18 (patch) | |
tree | 601570e40bb8bc9e84af4ed20e7445434e826cdb /LibOVR/CMakeLists.txt | |
parent | 672cdd0ef5455cd62a0d7f7eb6b9889f3ea35f21 (diff) |
Updating unix library discovery
Diffstat (limited to 'LibOVR/CMakeLists.txt')
-rw-r--r-- | LibOVR/CMakeLists.txt | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/LibOVR/CMakeLists.txt b/LibOVR/CMakeLists.txt index ce9c8bb..549589b 100644 --- a/LibOVR/CMakeLists.txt +++ b/LibOVR/CMakeLists.txt @@ -135,10 +135,25 @@ elseif(APPLE) else() - # FIXME switch to pkg-config for this? - SET(OculusVR_EXTRA_LIBS edid pthread udev X11 Xrandr) + find_package(X11 REQUIRED) + # Set up library and include paths + list(APPEND OculusVR_EXTRA_LIBS ${X11_X11_LIB}) + + # Check for XRandR (modern resolution switching and gamma control) + if (NOT X11_Xrandr_FOUND) + message(FATAL_ERROR "The RandR library and headers were not found") + endif() + + list(APPEND OculusVR_EXTRA_LIBS ${X11_Xrandr_LIB}) + + find_package (Threads REQUIRED) + list(APPEND OculusVR_EXTRA_LIBS ${CMAKE_THREAD_LIBS_INIT}) + + list(APPEND OculusVR_EXTRA_LIBS edid udev ) endif() + add_library(OculusVR STATIC ${SOURCE_FILES} ${HEADER_FILES}) +set(OVR_LIBRARIES ${OculusVR_EXTRA_LIBS} CACHE STRING "Dependencies of OculusVR") target_link_libraries(OculusVR ${OculusVR_EXTRA_LIBS}) |