]> git.cworth.org Git - apitrace/commitdiff
Allow to enable/disable EGL support.
authorJosé Fonseca <jose.r.fonseca@gmail.com>
Thu, 17 Nov 2011 15:45:10 +0000 (15:45 +0000)
committerJosé Fonseca <jose.r.fonseca@gmail.com>
Thu, 17 Nov 2011 15:50:26 +0000 (15:50 +0000)
As done with GUI, to avoid automagic dependencies.

CMakeLists.txt

index 57b76d1712a06e529cd4b6e08471d895be52b092..8dd547dbf1928c009bd3c4b0ecfcf81e9896fabe 100755 (executable)
@@ -17,6 +17,8 @@ endif ()
 # prescribed in http://www.gentoo.org/proj/en/qa/automagic.xml
 set (ENABLE_GUI "AUTO" CACHE STRING "Enable Qt GUI.")
 
+set (ENABLE_EGL "AUTO" CACHE STRING "Enable EGL support.")
+
 
 ##############################################################################
 # Find dependencies
@@ -49,10 +51,17 @@ else ()
 
     include_directories (${X11_INCLUDE_DIR})
 
-    pkg_check_modules (EGL egl)
-    if (EGL_FOUND)
-        include_directories (${EGL_INCLUDE_DIR})
-        add_definitions (-DHAVE_EGL)
+    if (ENABLE_EGL)
+        if (NOT ENABLE_EGL STREQUAL "AUTO")
+            set (REQUIRE_EGL REQUIRED)
+        endif ()
+        pkg_check_modules (EGL egl ${REQUIRE_EGL})
+        if (EGL_FOUND)
+            include_directories (${EGL_INCLUDE_DIR})
+            add_definitions (-DHAVE_EGL)
+        endif ()
+    else ()
+        set (EGL_FOUND 0)
     endif ()
 endif ()