[Piglit] [PATCH 3/4] tests/glx: fix Xrender detection
nobled
nobled at dreamwidth.org
Fri Mar 2 05:30:35 PST 2012
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.
---
tests/glx/CMakeLists.gl.txt | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/tests/glx/CMakeLists.gl.txt b/tests/glx/CMakeLists.gl.txt
index c20bec7..1d6621e 100644
--- a/tests/glx/CMakeLists.gl.txt
+++ b/tests/glx/CMakeLists.gl.txt
@@ -40,8 +40,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)
--
1.7.4.1
More information about the Piglit
mailing list