Page MenuHomeWildfire Games

Fix NVTT warning when building on some linux platforms
AbandonedPublic

Authored by Stan on Apr 4 2020, 5:14 PM.

Details

Reviewers
Itms
Summary

When building NVTT on raspbian and some other linuxes (I believe @Freagarach reported it too) I get the following warning

CMake Warning (dev) at /usr/share/cmake-3.13/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/arm-linux-gnueabihf/libGL.so

  and GLVND libraries for OpenGL and GLX:

    OPENGL_opengl_LIBRARY: /usr/lib/arm-linux-gnueabihf/libOpenGL.so
    OPENGL_glx_LIBRARY: /usr/lib/arm-linux-gnueabihf/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):
  src/CMakeLists.txt:20 (INCLUDE)
This warning is for project developers.  Use -Wno-dev to suppress it.

See https://cmake.org/cmake/help/v3.10/module/FindOpenGL.html

Test Plan

Check that this patch is correct.
Check that the warning is gone.
Check that textures are still converted as they should

Event Timeline

Stan created this revision.Apr 4 2020, 5:14 PM
Stan edited the summary of this revision. (Show Details)Apr 4 2020, 5:18 PM
Vulcan added a comment.Apr 4 2020, 5:19 PM

Successful build - Chance fights ever on the side of the prudent.

Link to build: https://jenkins.wildfiregames.com/job/docker-differential/1968/display/redirect

This indeed fixes the warning on my Debian 10 "toaster" :)
(However, since I am not (fully) knowledgeable about any implications of this code-change, I cannot accept.)

Itms edited reviewers, added: Itms; removed: Restricted Owners Package.Jun 23 2020, 6:31 PM
Itms added a subscriber: Itms.

I'm going to include it in D2563!

Stan added a comment.Jul 4 2020, 4:13 PM

Ah nice! Didn't see your comment until now. Should I abandon this?

Itms added a comment.Tue, Jul 14, 2:51 PM

Sorry, yes you can abandon this one, I'll include it as planned when I'm looking at NVTT again.

Stan abandoned this revision.Thu, Jul 23, 5:31 PM

Should be replaced by D2563