summaryrefslogtreecommitdiff
path: root/xmake/modules
diff options
context:
space:
mode:
Diffstat (limited to 'xmake/modules')
-rw-r--r--xmake/modules/private/check/checkers/api/target/kind.lua2
-rw-r--r--xmake/modules/target/action/uninstall/main.lua9
2 files changed, 10 insertions, 1 deletions
diff --git a/xmake/modules/private/check/checkers/api/target/kind.lua b/xmake/modules/private/check/checkers/api/target/kind.lua
index 127f78ad5..5d716b129 100644
--- a/xmake/modules/private/check/checkers/api/target/kind.lua
+++ b/xmake/modules/private/check/checkers/api/target/kind.lua
@@ -23,5 +23,5 @@ import(".api_checker")
function main(opt)
opt = opt or {}
- api_checker.check_targets("kind", table.join(opt, {values = {"object", "binary", "static", "shared", "headeronly", "phony"}}))
+ api_checker.check_targets("kind", table.join(opt, {values = {"object", "binary", "static", "shared", "headeronly", "moduleonly", "phony"}}))
end
diff --git a/xmake/modules/target/action/uninstall/main.lua b/xmake/modules/target/action/uninstall/main.lua
index cc5feb3ac..daa23917c 100644
--- a/xmake/modules/target/action/uninstall/main.lua
+++ b/xmake/modules/target/action/uninstall/main.lua
@@ -26,6 +26,12 @@ function _uninstall_files(target)
end
end
+-- uninstall modules
+function _uninstall_modules(target, opt)
+ local moduledir = path.join(target:installdir(), opt and opt.moduledir or "modules")
+ os.vrm(moduledir)
+end
+
-- the builtin uninstall main entry
function main(target, opt)
@@ -47,6 +53,9 @@ function main(target, opt)
end
end
+ -- remove modules
+ _uninstall_modules(target, opt)
+
-- uninstall the other files
_uninstall_files(target)
end