[Piglit] [PATCH] add a PIGLIT_BUILD_GL_TESTS option
Negreanu Marius
groleo at gmail.com
Thu Oct 18 11:11:25 PDT 2012
>From d9660648e5c41b2381fc82953bfede8d8451d8a2 Mon Sep 17 00:00:00 2001
From: Adrian Marius Negreanu <adrian.m.negreanu at intel.com>
Date: Thu, 18 Oct 2012 20:54:05 +0300
Subject: [PATCH] use X11_X11_LIB_FOUND instead of CMAKE_SYSTEM_NAME
don't add X11_X11_LIB on systems that
qualifies as Linux, but is missing the libX11.
Signed-off-by: Adrian Marius Negreanu <adrian.m.negreanu at intel.com>
---
CMakeLists.txt | 2 +-
tests/util/CMakeLists.txt | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 58c1bcc..a6fbf84 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -61,7 +61,7 @@ if(PIGLIT_BUILD_CL_TESTS)
find_package(OpenCL REQUIRED)
endif(PIGLIT_BUILD_CL_TESTS)
-IF(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
+IF(X11_X11_LIB_FOUND)
set(PIGLIT_HAS_X11 True)
add_definitions(-DPIGLIT_HAS_X11)
diff --git a/tests/util/CMakeLists.txt b/tests/util/CMakeLists.txt
index bb29c62..371aacd 100644
--- a/tests/util/CMakeLists.txt
+++ b/tests/util/CMakeLists.txt
@@ -50,12 +50,12 @@ set(UTIL_GL_LIBS
${WAFFLE_LDFLAGS}
)
-if(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
+if(X11_X11_LIB_FOUND)
set(UTIL_GL_LIBS
${UTIL_GL_LIBS}
${X11_X11_LIB}
)
-endif(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
+endif(X11_X11_LIB_FOUND)
if(OPENGL_egl_LIBRARY)
set(UTIL_GL_SOURCES
--
1.7.11.3
More information about the Piglit
mailing list