From 5b5c1fdb8fb80b52bbe63e9d5c8a5fca15ffda7f Mon Sep 17 00:00:00 2001 From: Galasnow <854932917@qq.com> Date: Thu, 8 Aug 2024 11:00:23 +0800 Subject: [PATCH] Fix build error with NDK r27 (#5615) Enable policy CMP0057 for cmake version >= 3.3 --- CMakeLists.txt | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 309e3b8fbd0..0f32a80c86e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -37,6 +37,11 @@ if(POLICY CMP0025) cmake_policy(SET CMP0025 NEW) endif() +if(POLICY CMP0057) + # reference from https://cmake.org/cmake/help/latest/policy/CMP0057.html + cmake_policy(SET CMP0057 NEW) +endif() + project(ncnn) if(MSVC AND NOT CMAKE_VERSION VERSION_LESS "3.15")