Commit 6fd8a1b3 by Stefan Philips

[FIX] CMake Policy CMP0072 issue by choosing GLNVD

[CHANGE] Use only OPENGL_LIBRARIES variable instead of OPENGL_gl_LIBRARY
parent 99f9422c
......@@ -76,7 +76,7 @@ IF( CMAKE_HOST_SYSTEM MATCHES "Linux" )
ENDIF()
TARGET_LINK_LIBRARIES( ${LibName} ${Boost_LIBRARIES} ${CMAKE_STANDARD_LIBRARIES} ${CMAKE_DL_LIBS}
${OPENGL_gl_LIBRARY}
${OPENGL_LIBRARIES}
${OPENSCENEGRAPH_LIBRARIES}
${INTERPRETER_LINK_LIBRARIES}
${ADDITIONAL_TARGET_LINK_LIBRARIES}
......
......@@ -344,8 +344,12 @@ IF( ANDROID )
SET( OPENGL_FOUND ON )
# link against GLES 2
SET( OPENGL_LIBRARIES "GLESv2" )
SET( OPENGL_gl_LIBRARY "GLESv2" )
ELSE()
# The explicit setting of GLVND can be removed, when we set the minimum cmake version to 3.11 or higher.
# CMake Policy: CMP0072 https://cmake.org/cmake/help/git-stage/policy/CMP0072.html
IF( CMAKE_HOST_SYSTEM MATCHES "Linux" )
SET( OpenGL_GL_PREFERENCE "GLVND" )
ENDIF()
FIND_PACKAGE( OpenGL REQUIRED )
# include the OpenGL header paths
INCLUDE_DIRECTORIES( SYSTEM ${OPENGL_INCLUDE_DIR} )
......
......@@ -701,7 +701,7 @@ FUNCTION( SETUP_MODULE _MODULE_NAME _MODULE_SOURCE_DIR _MODULE_DEPENDENCIES _MOD
TARGET_LINK_LIBRARIES( ${MODULE_NAME} ${CMAKE_STANDARD_LIBRARIES}
${OW_LIB_OPENWALNUT}
${Boost_LIBRARIES}
${OPENGL_gl_LIBRARY}
${OPENGL_LIBRARIES}
${OPENSCENEGRAPH_LIBRARIES}
${ADDITIONAL_TARGET_LINK_LIBRARIES}
${_MODULE_DEPENDENCIES}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment