aboutsummaryrefslogtreecommitdiff
path: root/tests/glx
diff options
context:
space:
mode:
authorDylan Noblesmith <nobled@dreamwidth.org>2012-02-27 20:36:34 +0000
committerDylan Noblesmith <nobled@dreamwidth.org>2012-03-03 13:16:50 +0000
commit50613560bf57ce4b77d1702bb1d2dade73218080 (patch)
tree6973df9c82e65065a1c80b989d12a9ac74fbc915 /tests/glx
parenta4d8676d39eaa6c8d972498741944121babcb846 (diff)
tests/glx: fix Xrender detection
Use the variables CMake provides so that compilation won't break if Xrender is in a different include directory. v2: Just don't build the one test that needs it if it's not found.
Diffstat (limited to 'tests/glx')
-rw-r--r--tests/glx/CMakeLists.gl.txt8
1 files changed, 6 insertions, 2 deletions
diff --git a/tests/glx/CMakeLists.gl.txt b/tests/glx/CMakeLists.gl.txt
index 789d84f9..4fd0ea2c 100644
--- a/tests/glx/CMakeLists.gl.txt
+++ b/tests/glx/CMakeLists.gl.txt
@@ -39,8 +39,12 @@ IF(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
add_executable (glx-swap-pixmap glx-swap-pixmap.c)
add_executable (glx-swap-pixmap-bad glx-swap-pixmap-bad.c)
add_executable (glx-swap-singlebuffer glx-swap-singlebuffer.c)
- add_executable (glx-tfp glx-tfp.c)
- target_link_libraries(glx-tfp Xrender)
+
+ if (X11_Xrender_FOUND)
+ include_directories(${X11_Xrender_INCLUDE_PATH})
+ add_executable (glx-tfp glx-tfp.c)
+ target_link_libraries(glx-tfp ${X11_Xrender_LIB})
+ endif()
add_executable (glx-pixmap-life glx-pixmap-life.c)
add_executable (glx-pixmap13-life glx-pixmap13-life.c)