]> git.cworth.org Git - apitrace-tests/blobdiff - apps/egl/gles2/CMakeLists.txt
Automate gles tests.
[apitrace-tests] / apps / egl / gles2 / CMakeLists.txt
index a45efdc2bd37fc3645a8e244a489be3435c92f36..6921d135bb4155f60322f1c21b66e8a7a0bc0062 100644 (file)
@@ -12,8 +12,16 @@ set (targets
 
 if (X11_FOUND)
     foreach (target ${targets})
-       add_executable (${api}_${target} ${target}.c)
-       set_target_properties (${api}_${target} PROPERTIES OUTPUT_NAME ${target})
-       target_link_libraries (${api}_${target} ${EGL_LIBRARIES} ${GLESV2_LIBRARIES})
+        add_executable (${api}_${target} ${target}.c)
+        set_target_properties (${api}_${target} PROPERTIES OUTPUT_NAME ${target})
+        target_link_libraries (${api}_${target} ${EGL_LIBRARIES} ${GLESV2_LIBRARIES})
+
+        if (EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/${target}.ref.txt)
+            add_app_test(
+                NAME ${api}_${target}
+                TARGET ${api}_${target}
+                REF ${target}.ref.txt
+            )
+        endif ()
     endforeach (target)
 endif ()