From 338088a607b3ffe10602a44a2f1b393f4ba722b2 Mon Sep 17 00:00:00 2001 From: Jérôme Leclercq Date: Tue, 19 Jul 2022 18:19:13 +0200 Subject: cmake: add support of include_external_headers policy --- xmake/modules/package/tools/cmake.lua | 3 +++ 1 file changed, 3 insertions(+) diff --git a/xmake/modules/package/tools/cmake.lua b/xmake/modules/package/tools/cmake.lua index dc227b89b..932dcb522 100644 --- a/xmake/modules/package/tools/cmake.lua +++ b/xmake/modules/package/tools/cmake.lua @@ -275,6 +275,9 @@ function _get_configs_for_generic(package, configs, opt) if package:config("pic") ~= false then table.insert(configs, "-DCMAKE_POSITION_INDEPENDENT_CODE=ON") end + if package:policy("package.include_external_headers") == false then + table.insert(configs, "-DCMAKE_NO_SYSTEM_FROM_IMPORTED=ON") + end end -- get configs for windows -- cgit v1.3.1