Disable piglit if dependencies not met.
@@ -28,8 +28,17 @@ set(TS_BASEDIR "${TESTSUITE_BASEDIR}/${TS_NAME}")
set(TS_BUILDDIR "${TS_BASEDIR}/src/${TS_NAME}-build")
set(TS_SRCDIR "${TESTSUITE_SOURCE_BASEDIR}/${TS_NAME}")
-if(HAVE_GIT)
+find_package(GLUT QUIET)
+find_package(PNG QUIET)
+if(NOT HAVE_GIT)
+ message(STATUS "Disabling testsuite ${TS_NAME}, requires git to checkout sources")
+elseif(NOT GLUT_FOUND)
+ message(STATUS "Disabling testsuite ${TS_NAME}, requires glut library")
+elseif(NOT PNG_FOUND)
+ message(STATUS "Disabling testsuite ${TS_NAME}, requires PNG library")
+
+else()
message(STATUS "Enabling testsuite ${TS_NAME}")
list(APPEND ACTUALLY_ENABLED_TESTSUITES "${TS_NAME}")
set(ACTUALLY_ENABLED_TESTSUITES ${ACTUALLY_ENABLED_TESTSUITES} PARENT_SCOPE)
@@ -221,6 +230,4 @@ set_tests_properties(
PROPERTIES
LABELS "piglit")
-else()
- message(STATUS "Disabling testsuite ${TS_NAME}, requires git to checkout sources")
endif()
