diff options
| author | Albrecht Schlosser <albrechts.fltk@online.de> | 2021-02-28 14:56:56 +0100 |
|---|---|---|
| committer | Albrecht Schlosser <albrechts.fltk@online.de> | 2021-03-01 10:02:41 +0100 |
| commit | 266b5e7cddaaca312b77abd5696e0281af3251c9 (patch) | |
| tree | fdf0d0a3450caddcc46da7c8728147ed9ed349e3 /CMakeLists.txt | |
| parent | ae41dc46b9759de652aa57850dde7ee7d66e03bb (diff) | |
Fix CMake warning related to CMP0072
Diffstat (limited to 'CMakeLists.txt')
| -rw-r--r-- | CMakeLists.txt | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 001f94088..d02059166 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -28,14 +28,20 @@ # Minimum CMake version required by FLTK 1.4 (06/2020, work in progress) cmake_minimum_required (VERSION 3.2.3 FATAL_ERROR) -# Use "legacy mode" of FindOpenGL (avoid CMake developer warning) +####################################################################### + +# Use "legacy mode" of FindOpenGL (avoid CMake developer warning). # Note: we're using FindOpenGL with `OPENGL_LIBRARIES` and not (yet) -# the `OpenGL::GL` target. May be changed in the future. +# the `OpenGL::GL` target. This may be changed in the future. # See https://cmake.org/cmake/help/latest/policy/CMP0072.html +# Update Feb 28, 2021: To avoid a warning about "OLD" policies we set +# OpenGL_GL_PREFERENCE directly to "LEGACY" (other option: "GLVND"). -if (POLICY CMP0072) - cmake_policy (SET CMP0072 OLD) -endif () +# if (POLICY CMP0072) +# cmake_policy (SET CMP0072 OLD) +# endif () + +set (OpenGL_GL_PREFERENCE LEGACY) ####################################################################### # define the FLTK project and version |
