summaryrefslogtreecommitdiff
path: root/xmake/core
diff options
context:
space:
mode:
Diffstat (limited to 'xmake/core')
-rw-r--r--xmake/core/sandbox/modules/import/core/project/project.lua37
1 files changed, 3 insertions, 34 deletions
diff --git a/xmake/core/sandbox/modules/import/core/project/project.lua b/xmake/core/sandbox/modules/import/core/project/project.lua
index 8a808e7da..9b69349d0 100644
--- a/xmake/core/sandbox/modules/import/core/project/project.lua
+++ b/xmake/core/sandbox/modules/import/core/project/project.lua
@@ -127,41 +127,10 @@ function sandbox_core_project.check_options()
end
end
--- config target
-function sandbox_core_project._config_target(target, opt)
- for _, rule in ipairs(table.wrap(target:orderules())) do
- local before_config = rule:script("config_before")
- if before_config then
- before_config(target, opt)
- end
- end
-
- for _, rule in ipairs(table.wrap(target:orderules())) do
- local on_config = rule:script("config")
- if on_config then
- on_config(target, opt)
- end
- end
- local on_config = target:script("config")
- if on_config then
- on_config(target, opt)
- end
-
- for _, rule in ipairs(table.wrap(target:orderules())) do
- local after_config = rule:script("config_after")
- if after_config then
- after_config(target, opt)
- end
- end
-end
-
+-- config targets
function sandbox_core_project._config_targets(opt)
- opt = opt or {}
- for _, target in ipairs(table.wrap(project.ordertargets())) do
- if target:is_enabled() then
- sandbox_core_project._config_target(target, opt)
- end
- end
+ import("private.utils.target", {alias = "target_utils"})
+ target_utils.config_targets(opt)
end
-- config targets