|
|
commit 266b5e7cddaaca312b77abd5696e0281af3251c9
Author: Albrecht Schlosser <albrechts.fltk@online.de>
AuthorDate: Sun Feb 28 14:56:56 2021 +0100
Commit: Albrecht Schlosser <albrechts.fltk@online.de>
CommitDate: Mon Mar 1 10:02:41 2021 +0100
Fix CMake warning related to CMP0072
CMakeLists.txt | 16 +++++++++++-----
1 file changed, 11 insertions(+), 5 deletions(-)
diff --git CMakeLists.txt CMakeLists.txt
index 001f940..d020591 100644
--- CMakeLists.txt
+++ 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
[ Direct Link to Message ] | |
|
| |