summaryrefslogtreecommitdiff
path: root/xmake/modules/package/tools/cmake.lua
diff options
context:
space:
mode:
authorJérôme Leclercq <[email protected]>2022-07-19 18:19:13 +0200
committerSirLynix <[email protected]>2022-07-20 13:02:45 +0200
commit338088a607b3ffe10602a44a2f1b393f4ba722b2 (patch)
treebabbeaf7910cdbc1ce26cf74eea51f53d044cb1b /xmake/modules/package/tools/cmake.lua
parent5dd962d1b0e51b839f88b580c5586ef8cfca3c60 (diff)
cmake: add support of include_external_headers policy
Diffstat (limited to 'xmake/modules/package/tools/cmake.lua')
-rw-r--r--xmake/modules/package/tools/cmake.lua3
1 files changed, 3 insertions, 0 deletions
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