summaryrefslogtreecommitdiff
path: root/xmake/modules/package/tools/xmake.lua
diff options
context:
space:
mode:
authorJérôme Leclercq <[email protected]>2022-07-16 12:53:53 +0200
committerGitHub <[email protected]>2022-07-16 12:53:53 +0200
commita444322152a87ba33be47c7d1371754269c72a8e (patch)
treea25039ba38e1d993b45c3975343d04224615d59f /xmake/modules/package/tools/xmake.lua
parent32085006b2eb00ec3d74290a200a35e5104f4c39 (diff)
xmake tool: allow package to override mode/kind
Diffstat (limited to 'xmake/modules/package/tools/xmake.lua')
-rw-r--r--xmake/modules/package/tools/xmake.lua8
1 files changed, 6 insertions, 2 deletions
diff --git a/xmake/modules/package/tools/xmake.lua b/xmake/modules/package/tools/xmake.lua
index b871afcd2..4d2294d40 100644
--- a/xmake/modules/package/tools/xmake.lua
+++ b/xmake/modules/package/tools/xmake.lua
@@ -45,8 +45,12 @@ function _get_configs(package, configs)
local ldflags = table.join(table.wrap(package:config("ldflags")), get_config("ldflags"))
table.insert(configs, "--plat=" .. package:plat())
table.insert(configs, "--arch=" .. package:arch())
- table.insert(configs, "--mode=" .. (package:is_debug() and "debug" or "release"))
- table.insert(configs, "--kind=" .. (package:config("shared") and "shared" or "static"))
+ if configs.mode == nil then
+ table.insert(configs, "--mode=" .. (package:is_debug() and "debug" or "release"))
+ end
+ if configs.kind == nil then
+ table.insert(configs, "--kind=" .. (package:config("shared") and "shared" or "static"))
+ end
if package:is_plat("windows") then
local vs_runtime = package:config("vs_runtime")
if vs_runtime then