This defaults to true on Linux and false elswhere. If set, then CMake requires that EGL be installed onto the system.
CC: Ian Romanick <[email protected]> Signed-off-by: Chad Versace <[email protected]> --- CMakeLists.txt | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 82a9d4a..dfdfb27 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -93,8 +93,10 @@ IF(${CMAKE_SYSTEM_NAME} MATCHES "Linux") pkg_check_modules(XCB_DRI2 QUIET xcb-dri2) option(PIGLIT_BUILD_GLX_TESTS "Build tests that require GLX" ON) + option(PIGLIT_BUILD_EGL_TESTS "Build tests that require EGL" ON) ELSE() option(PIGLIT_BUILD_GLX_TESTS "Build tests that require GLX" OFF) + option(PIGLIT_BUILD_EGL_TESTS "Build tests that require EGL" OFF) ENDIF() # Choose to build tests that use dma_buf. @@ -132,6 +134,16 @@ IF(PIGLIT_BUILD_GLX_TESTS) pkg_check_modules(GLPROTO REQUIRED glproto) ENDIF() +if(PIGLIT_BUILD_EGL_TESTS) + FIND_LIBRARY(OPENGL_egl_LIBRARY + REQUIRED + NAMES EGL + PATHS /usr/lib + ) + + add_definitions(-DPIGLIT_HAS_EGL) +endif() + # Check for presence of Python 2.6 or greater. foreach(python_cmd python2 python) execute_process( @@ -266,15 +278,6 @@ else (APPLE) ) endif (APPLE) -FIND_LIBRARY(OPENGL_egl_LIBRARY - NAMES EGL - PATHS /usr/lib -) - -if(OPENGL_egl_LIBRARY) - add_definitions(-DPIGLIT_HAS_EGL) -endif() - find_library(OPENGL_gles1_LIBRARY NAMES GLESv1_CM) find_library(OPENGL_gles2_LIBRARY NAMES GLESv2) -- 1.8.3.1 _______________________________________________ Piglit mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/piglit
