[cmake,android] enable LTO if CMake >= 3.20.0

This commit is contained in:
akallabeth 2025-02-22 14:58:11 +01:00
parent 73e26b6f96
commit 9f60bb40a2
No known key found for this signature in database
GPG Key ID: A49454A3FC909FD5

View File

@ -14,7 +14,7 @@ endif()
# known issue on android, thus disabled until we support newer CMake
# https://github.com/android/ndk/issues/1444
if(NOT ANDROID)
if(NOT ANDROID OR ("${CMAKE_VERSION}" GREATER_EQUAL "3.20.0"))
if(POLICY CMP0069)
cmake_policy(SET CMP0069 NEW)
endif()