Page MenuHomePhabricator

OpenGL warning in Cmake
Closed, ResolvedPublic

Description

current MITK master, Ubuntu 18.04, cmake 3.12.2, the build itself works fine and MITKWorkbench seems to work normal

CMake Warning (dev) at /opt/CMake/share/cmake-3.12/Modules/FindOpenGL.cmake:270 (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: /usr/lib/x86_64-linux-gnu/libGL.so

  and GLVND libraries for OpenGL and GLX:

    OPENGL_opengl_LIBRARY: /usr/lib/x86_64-linux-gnu/libOpenGL.so
    OPENGL_glx_LIBRARY: /usr/lib/x86_64-linux-gnu/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/PackageDepends/MITK_OpenGL_Config.cmake:1 (find_package)
  CMake/mitkFunctionUseModules.cmake:52 (include)
  CMake/mitkFunctionUseModules.cmake:131 (_include_package_config)
  CMake/mitkFunctionCreateModule.cmake:606 (mitk_use_modules)
  Modules/LegacyGL/CMakeLists.txt:3 (MITK_CREATE_MODULE)
This warning is for project developers.  Use -Wno-dev to suppress it.