summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJérôme Leclercq <[email protected]>2021-05-03 14:50:28 +0200
committerGitHub <[email protected]>2021-05-03 14:50:28 +0200
commit20b34bf7cd344c251d05059ed13c6215af77cfd1 (patch)
tree7b16aadee2988c24bd0c33124d06671a2711b571
parentba285402bd1f5fed3eedc5a507ec98a232de8c27 (diff)
Update 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 a15812300..b0b92396a 100644
--- a/xmake/modules/package/tools/cmake.lua
+++ b/xmake/modules/package/tools/cmake.lua
@@ -225,6 +225,9 @@ function _get_configs_for_generic(package, configs, opt)
if shflags then
table.insert(configs, "-DCMAKE_SHARED_LINKER_FLAGS=" .. shflags)
end
+ if package:config("pic") ~= false then
+ table.insert(configs, "-DCMAKE_POSITION_INDEPENDENT_CODE=ON")
+ end
end
-- get configs for windows