From: José Fonseca Date: Thu, 17 Nov 2011 15:45:10 +0000 (+0000) Subject: Allow to enable/disable EGL support. X-Git-Url: https://git.cworth.org/git?a=commitdiff_plain;h=82da24205335050569192e2c7b2427f372aad9b5;p=apitrace Allow to enable/disable EGL support. As done with GUI, to avoid automagic dependencies. --- diff --git a/CMakeLists.txt b/CMakeLists.txt index 57b76d1..8dd547d 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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 ()