[Piglit] [PATCH 02/12] cmake: include piglit_wl/gbm_framework only when needed

Emil Velikov emil.l.velikov at gmail.com
Tue Aug 12 10:18:42 PDT 2014


One does not need to build either one if the target does not
have/support them. The upcoming waffle WGL support is a nice example.

Signed-off-by: Emil Velikov <emil.l.velikov at gmail.com>
---
 tests/util/CMakeLists.txt | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

diff --git a/tests/util/CMakeLists.txt b/tests/util/CMakeLists.txt
index b2a49ab..a9f5f07 100644
--- a/tests/util/CMakeLists.txt
+++ b/tests/util/CMakeLists.txt
@@ -49,14 +49,22 @@ set(UTIL_GL_SOURCES
 
 if(PIGLIT_USE_WAFFLE)
 	list(APPEND UTIL_GL_SOURCES
-		piglit-framework-gl/piglit_gbm_framework.c
 		piglit-framework-gl/piglit_fbo_framework.c
 		piglit-framework-gl/piglit_wfl_framework.c
 		piglit-framework-gl/piglit_winsys_framework.c
-		piglit-framework-gl/piglit_wl_framework.c
 		piglit-util-waffle.c
 	)
 
+	if(PIGLIT_HAS_GBM)
+		list(APPEND UTIL_GL_SOURCES
+			piglit-framework-gl/piglit_gbm_framework.c
+		)
+	endif()
+	if(PIGLIT_HAS_WAYLAND)
+		list(APPEND UTIL_GL_SOURCES
+			piglit-framework-gl/piglit_wl_framework.c
+		)
+	endif()
 	if(PIGLIT_HAS_X11)
 		list(APPEND UTIL_GL_SOURCES
 			piglit-framework-gl/piglit_x11_framework.c
-- 
2.0.2



More information about the Piglit mailing list