diff options
author | Tom Fogal <tfogal@nvidia.com> | 2017-06-09 01:02:42 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2017-09-25 13:22:29 (GMT) |
commit | e2e8a690cd7d1e5eba574b810842296beb603d9c (patch) | |
tree | 8db0dfd0a9bb1bff1e71bfe95cb820d5742e05b0 /Tests/FindOpenGL/CMakeLists.txt | |
parent | eae3765b67b653d3f00afa44a60719a387262af8 (diff) | |
download | CMake-e2e8a690cd7d1e5eba574b810842296beb603d9c.zip CMake-e2e8a690cd7d1e5eba574b810842296beb603d9c.tar.gz CMake-e2e8a690cd7d1e5eba574b810842296beb603d9c.tar.bz2 |
FindOpenGL: Add support for GLVND on Linux
Find GLVND components if available. Add `GLX` and `EGL` options for
COMPONENTS that allow requesting these libraries explicitly. Introduce
new import targets for these windowing-system-specific libraries.
On a GLVND system, populate the legacy `OPENGL_LIBRARIES` variable and
the `OpenGL::GL` target using the `OpenGL` and `GLX` components. On
non-GLVND systems, continue to use the legacy `GL` library and simply do
not provide the GLVND components. Application code can choose to adapt
based on the availability of GLVND components as imported targets.
Diffstat (limited to 'Tests/FindOpenGL/CMakeLists.txt')
-rw-r--r-- | Tests/FindOpenGL/CMakeLists.txt | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/Tests/FindOpenGL/CMakeLists.txt b/Tests/FindOpenGL/CMakeLists.txt index 9aa3aba..97c9e60 100644 --- a/Tests/FindOpenGL/CMakeLists.txt +++ b/Tests/FindOpenGL/CMakeLists.txt @@ -1,3 +1,9 @@ +if(CMAKE_SYSTEM_NAME STREQUAL "Linux" AND CMake_TEST_FindOpenGL_VND) + set(_vnd_testing TRUE) +else() + set(_vnd_testing FALSE) +endif() + add_test(NAME FindOpenGL.Test COMMAND ${CMAKE_CTEST_COMMAND} -C $<CONFIGURATION> --build-and-test @@ -6,5 +12,6 @@ add_test(NAME FindOpenGL.Test COMMAND ${build_generator_args} --build-project TestFindOpenGL --build-options ${build_options} + -DOpenGL_TEST_VND=${_vnd_testing} --test-command ${CMAKE_CTEST_COMMAND} -V -C $<CONFIGURATION> ) |