On Linux, unconditionally set the following internal CMake flags to true: PIGLIT_HAS_X11 PIGLIT_HAS_GLX Also define feature macros with the same names.
On all systems, if libEGL is found, then do the same for PIGLIT_HAS_EGL. The CMake flags will allow us to selectively add certain files to libpiglitutil_gl*. The flags and macros are used in a following commit. Signed-off-by: Chad Versace <chad.vers...@linux.intel.com> --- CMakeLists.txt | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 224aa18..bc87d4d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -42,7 +42,12 @@ if(PIGLIT_BUILD_CL_TESTS) endif(PIGLIT_BUILD_CL_TESTS) IF(${CMAKE_SYSTEM_NAME} MATCHES "Linux") + set(PIGLIT_HAS_X11 True) add_definitions(-DPIGLIT_HAS_X11) + + set(PIGLIT_HAS_GLX True) + add_definitions(-DPIGLIT_HAS_GLX) + option(PIGLIT_BUILD_GLX_TESTS "Build tests that require GLX" ON) ELSE() option(PIGLIT_BUILD_GLX_TESTS "Build tests that require GLX" OFF) @@ -191,6 +196,12 @@ FIND_LIBRARY(OPENGL_egl_LIBRARY NAMES EGL PATHS /usr/lib ) + +if(OPENGL_egl_LIBRARY) + set(PIGLIT_HAS_EGL True) + add_definitions(-DPIGLIT_HAS_EGL) +endif() + find_library(OPENGL_gles1_LIBRARY NAMES GLESv1_CM) find_library(OPENGL_gles2_LIBRARY NAMES GLESv2) -- 1.7.12.1 _______________________________________________ Piglit mailing list Piglit@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/piglit