diff options
| author | Arthur LAURENT <[email protected]> | 2023-01-05 14:01:18 +0100 |
|---|---|---|
| committer | Arthur LAURENT <[email protected]> | 2023-01-06 12:01:43 +0100 |
| commit | 64b476a2b13975e484117bc76ea04773fb9e5974 (patch) | |
| tree | 27b8898ea52a6e2a48a61b75ea982ce18846d013 | |
| parent | 99a33ea8be3beab1c05f39dd8f2ce8cf59c284cd (diff) | |
use os.files instead of os.match
| -rw-r--r-- | xmake/rules/c++/modules/modules_support/common.lua | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/xmake/rules/c++/modules/modules_support/common.lua b/xmake/rules/c++/modules/modules_support/common.lua index 394d9b60e..25fcc89f3 100644 --- a/xmake/rules/c++/modules/modules_support/common.lua +++ b/xmake/rules/c++/modules/modules_support/common.lua @@ -110,15 +110,13 @@ function get_all_package_modules(target, modules, opt) for name, package in pairs(target:pkgs()) do package_modules = package_modules or {} local modules_dir = path.join(package:installdir(), "modules", name) - local meta_files = os.match(path.join(modules_dir, "**.meta-info"), false) - if meta_files then - for _, file in ipairs(meta_files) do - local metadata = json.loadfile(file) - package_modules[metadata._VENDOR_extension.name] = { - file = path.join(modules_dir, metadata._VENDOR_extension.file), - metadata = metadata - } - end + local meta_files = os.files(path.join(modules_dir, "**.meta-info")) + for _, file in ipairs(meta_files) do + local metadata = json.loadfile(file) + package_modules[metadata._VENDOR_extension.name] = { + file = path.join(modules_dir, metadata._VENDOR_extension.file), + metadata = metadata + } end end |
