diff options
author | Tom Hochstein <tom.hochstein@nxp.com> | 2022-06-03 10:44:29 -0500 |
---|---|---|
committer | Marge Bot <emma+marge@anholt.net> | 2022-12-09 21:22:09 +0000 |
commit | 8b5ada9ffa94fe40a170619c4b94a2db35de8efb (patch) | |
tree | 2a85af998ae01fc71de2024cc56c74ecfd25ed3e | |
parent | c669792b8b1a5a39ddcd8a473c1c7b7cd674a5ac (diff) |
cmake: Don't enable GLX if tests are disabled
Allow building for systems that don't support GLX.
Signed-off-by: Tom Hochstein <tom.hochstein@nxp.com>
Part-of: <https://gitlab.freedesktop.org/mesa/piglit/-/merge_requests/720>
-rw-r--r-- | CMakeLists.txt | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index e9015651f..9adb9b318 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -134,10 +134,7 @@ if(PIGLIT_BUILD_CL_TESTS) endif(PIGLIT_BUILD_CL_TESTS) IF(${CMAKE_SYSTEM_NAME} MATCHES "Linux") - if(X11_FOUND AND OPENGL_gl_LIBRARY) - # Assume the system has GLX. In the future, systems may exist - # with libGL and libX11 but no GLX, but that world hasn't - # arrived yet. + if(X11_FOUND AND OPENGL_gl_LIBRARY AND PIGLIT_BUILD_GLX_TESTS) set(PIGLIT_HAS_GLX True) add_definitions(-DPIGLIT_HAS_GLX) endif() |