From b7d1d35c208e82769098d06c9edb64b7c67d18ae Mon Sep 17 00:00:00 2001 From: Marcel Metz Date: Fri, 18 Feb 2011 23:01:15 -0500 Subject: [PATCH] Added library search for math and realtime library in test and example projects for x11 platform. --- examples/CMakeLists.txt | 8 +++++++- tests/CMakeLists.txt | 6 ++++++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt index 345631cc..292db1ce 100644 --- a/examples/CMakeLists.txt +++ b/examples/CMakeLists.txt @@ -1,8 +1,14 @@ # This line is used to link with static libraries # Note that the library list should be updated to be obtained from -# the main CMakeLists.txt +# the main CMakeLists.txt link_libraries(libglfwStatic ${GLFW_LIBRARIES} ${OPENGL_glu_LIBRARY}) +if (UNIX AND NOT APPLE AND NOT CYGWIN) + find_library(MATH_LIBRARY m) + find_library(REALTIME_LIBRARY rt) + link_libraries(${MATH_LIBRARY} ${REALTIME_LIBRARY}) +endif (UNIX AND NOT APPLE AND NOT CYGWIN) + include_directories(${GLFW_SOURCE_DIR}/include ${GLFW_SOURCE_DIR}/support ${OPENGL_INCLUDE_DIR}) diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 9ef07acc..f4c99bb2 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -1,6 +1,12 @@ link_libraries(libglfwStatic ${GLFW_LIBRARIES} ${OPENGL_glu_LIBRARY}) +if (UNIX AND NOT APPLE AND NOT CYGWIN) + find_library(MATH_LIBRARY m) + find_library(REALTIME_LIBRARY rt) + link_libraries(${MATH_LIBRARY} ${REALTIME_LIBRARY}) +endif (UNIX AND NOT APPLE AND NOT CYGWIN) + include_directories(${GLFW_SOURCE_DIR}/include ${GLFW_SOURCE_DIR}/support ${OPENGL_INCLUDE_DIR})