+# Check for the presence of several python packages, which are needed to build
+# generated tests.
+execute_process(
+ COMMAND ${PYTHON_EXECUTABLE} -c "import PIL"
+ OUTPUT_QUIET
+ ERROR_QUIET
+ RESULT_VARIABLE IMPORT_PIL_RESULT)
+if (IMPORT_PIL_RESULT EQUAL 0)
+ set (PIL_FOUND 1)
+else ()
+ message (STATUS "python PIL module not found")
+endif ()
+