From 3ae0b48a6f23d09676d37c0430ff378f1468dcef Mon Sep 17 00:00:00 2001 From: ruki Date: Fri, 11 Oct 2024 00:45:33 +0800 Subject: [PATCH] improve ndk build --- packages/k/keystone/xmake.lua | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/packages/k/keystone/xmake.lua b/packages/k/keystone/xmake.lua index 10453c49028..6de82e09528 100644 --- a/packages/k/keystone/xmake.lua +++ b/packages/k/keystone/xmake.lua @@ -34,8 +34,11 @@ package("keystone") table.insert(configs, "-DKEYSTONE_BUILD_STATIC_RUNTIME=" .. (package:has_runtime("MT", "MTd") and "ON" or "OFF")) elseif package:is_plat("android") then -- support for ndk >= r27 - table.insert(configs, "-DCMAKE_POLICY_DEFAULT_CMP0057=NEW") - end + io.insert("CMakeLists.txt", 1, [[if (POLICY CMP0057) + cmake_policy(SET CMP0057 NEW) + endif()]]) + end + io.replace("CMakeLists.txt", "add_subdirectory(suite/fuzz)", "", {plain = true}) import("package.tools.cmake").install(package, configs) os.cp("include", package:installdir()) end)