From e47627b6cf4717816d5a132e3b56acc75f15d8e0 Mon Sep 17 00:00:00 2001 From: halx99 Date: Sat, 8 Jul 2023 17:13:30 +0800 Subject: [PATCH] Fix cmake find_package GLX warning for linux --- cmake/Modules/AXBuildSet.cmake | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/cmake/Modules/AXBuildSet.cmake b/cmake/Modules/AXBuildSet.cmake index 07d1a4f3f0..4c6a300107 100644 --- a/cmake/Modules/AXBuildSet.cmake +++ b/cmake/Modules/AXBuildSet.cmake @@ -7,6 +7,12 @@ set(CMAKE_DEBUG_TARGET_PROPERTIES # POSITION_INDEPENDENT_CODE ) +# The ``OLD`` behavior for this policy is to set ``OpenGL_GL_PREFERENCE`` to +# ``LEGACY``. The ``NEW`` behavior for this policy is to set +# ``OpenGL_GL_PREFERENCE`` to ``GLVND``. +# need review those libs: X11 Xi Xrandr Xxf86vm Xinerama Xcursor rt m +cmake_policy(SET CMP0072 NEW) + # some useful variables for every one ax project set(ENGINE_BINARY_PATH ${PROJECT_BINARY_DIR}/engine)