raylib/cmake
simendsjo 884d30b85a
Use GLVND also for old cmake versions (#2826)
Use GLVND also when legacy implementations exist for old cmake versions
<= 3.10. This is a breaking change for old cmake versions (prior to
around 2017-10-05) which will now use GLVND rather than defaulting to
libGL.

This fixes the following warning when building:

    CMake Warning (dev) at /gnu/store/qv13zgbmyx0vjav8iiqp772kp6rxvwnd-cmake-3.24.2/share/cmake-3.24/Modules/FindOpenGL.cmake:315 (message):
      Policy CMP0072 is not set: FindOpenGL prefers GLVND by default when
      available.  Run "cmake --help-policy CMP0072" for policy details.  Use the
      cmake_policy command to set the policy and suppress this warning.

      FindOpenGL found both a legacy GL library:

        OPENGL_gl_LIBRARY: /home/simendsjo/.guix-profile/lib/libGL.so

      and GLVND libraries for OpenGL and GLX:

        OPENGL_opengl_LIBRARY: /home/simendsjo/.guix-profile/lib/libOpenGL.so
        OPENGL_glx_LIBRARY: /home/simendsjo/.guix-profile/lib/libGLX.so

      OpenGL_GL_PREFERENCE has not been set to "GLVND" or "LEGACY", so for
      compatibility with CMake 3.10 and below the legacy GL library will be used.
    Call Stack (most recent call first):
      cmake/LibraryConfigurations.cmake:21 (find_package)
      src/CMakeLists.txt:46 (include)
    This warning is for project developers.  Use -Wno-dev to suppress it.

See https://cmake.org/cmake/help/latest/policy/CMP0072.html

Closes #2825
2022-12-11 13:37:38 +01:00
..
AddIfFlagCompiles.cmake CMake: Move reusable code to new cmake/ directory 2018-05-21 01:08:29 +02:00
BuildOptions.cmake Remove STATIC and SHARED variables. (#1542) 2021-01-22 00:07:22 +01:00
CompileDefinitions.cmake ADDED: Optional support for PNM images (.ppm, .pgm) 2022-11-29 10:58:27 +01:00
CompilerFlags.cmake Documentation cmake (#1549) 2021-01-26 14:34:27 +01:00
EnumOption.cmake CMake: Fail when -D{PLATFORM,OPENGL_VERSION}=INVALID_VALUE 2018-07-23 21:00:48 +02:00
GlfwImport.cmake Fix CMake build on Raspberry Pi OS Bullseye (#2548) 2022-06-24 10:50:24 +02:00
InstallConfigurations.cmake Remove STATIC and SHARED variables. (#1542) 2021-01-22 00:07:22 +01:00
JoinPaths.cmake Add join_paths and join prefix with include/lib dirs (#1383) 2020-09-25 16:20:49 +02:00
LibraryConfigurations.cmake Use GLVND also for old cmake versions (#2826) 2022-12-11 13:37:38 +01:00
LibraryPathToLinkerFlags.cmake CMake: Major cleanup to support find_package(raylib) 2018-07-29 12:35:35 +02:00
PackConfigurations.cmake Big cmake changes (#1514) 2021-01-13 23:10:02 +01:00
PopulateConfigVariablesLocally.cmake CMake: Major cleanup to support find_package(raylib) 2018-07-29 12:35:35 +02:00
raylib-config-version.cmake CMake: Major cleanup to support find_package(raylib) 2018-07-29 12:35:35 +02:00
raylib-config.cmake add: cmake config include guard (#2592) 2022-07-26 14:28:26 +02:00