summaryrefslogtreecommitdiffstats
path: root/src/opengl/qopenglbuffer.h
diff options
context:
space:
mode:
authorAlexandru Croitor <[email protected]>2025-09-26 14:38:25 +0200
committerAlexandru Croitor <[email protected]>2025-10-21 19:36:53 +0200
commit97357b5df94666c45aa0c4ca5eaeb8c950d7033b (patch)
tree376e362f01ac52f3d106e39ba0404c0ae91af3eb /src/opengl/qopenglbuffer.h
parent6bd020834043c8029828a0c6dc04b876a0ceec98 (diff)
CMake: Set CMAKE_POLICY_VERSION_MINIMUM with older Android NDKs
When using CMake 3.31+ with Android NDKs older than r28, CMake shows the following deprecation warning: CMake Deprecation Warning at ndk/27.2.12479018/build/cmake/android.toolchain.cmake:35 (cmake_minimum_required): Compatibility with CMake < 3.10 will be removed from a future version of CMake. This warning appears multiple times, when configuring Qt, user projects, try_compile calls, etc. That's because the Android NDK cmake toolchain file sets cmake_minimum_required(VERSION 3.6) unconditionally, which is less than 3.10. To avoid the warnings, we can set the CMAKE_POLICY_VERSION_MINIMUM variable or environment variable to 3.10. The variable can only be set in CMake 4.0+ though, so it won't help with CMake 3.31. The assignment has to be done in multiple places: - When detecting Android in QtAutoDetectHelpers.cmake - When generating the Qt toolchain file in QtToolchainHelpers.cmake - When doing try_compile calls in QtFeature.cmake - When doing test calls in QtRunCMakeTestWrappers.cmake To be on the safer side, the following opt-outs are provided: - QT_NO_SET_ANDROID_CMAKE_POLICY_VERSION_MINIMUM If set to true, the automatic setting of CMAKE_POLICY_VERSION_MINIMUM is disabled. - QT_ANDROID_CMAKE_POLICY_VERSION_MINIMUM A version to use instead of 3.10. - QT_NO_SET_RUN_CMAKE_TESTS_CMAKE_POLICY_VERSION_MINIMUM Disables the assignment for RunCMake tests. These are considered at various points in the code, rather than just once when configuring Qt. When using NDK r28 or newer, the toolchain file sets 3.10 itself, so no warning appears. Pick-to: 6.8 6.10 Change-Id: I47c6013f9cafed8836c32d2b726e75838c9d8779 Reviewed-by: Joerg Bornemann <[email protected]> Reviewed-by: Assam Boudjelthia <[email protected]>
Diffstat (limited to 'src/opengl/qopenglbuffer.h')
0 files changed, 0 insertions, 0 deletions