diff options
| author | ruki <[email protected]> | 2024-04-02 00:56:45 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2024-04-02 00:56:45 +0800 |
| commit | f5d208c3aba4759bf2246d91a26d19d00603d2d1 (patch) | |
| tree | 4a22c64c3b23015a7576d0d88bd28826572d68ad | |
| parent | cc60126eb206617dc69e6aa96c21ad13c1731f8c (diff) | |
add module.binary/shared rules
| -rw-r--r-- | tests/projects/other/native_module/modules/binary/bar/xmake.lua | 2 | ||||
| -rw-r--r-- | tests/projects/other/native_module/xmake.lua | 2 | ||||
| -rw-r--r-- | xmake/rules/module/xmake.lua | 4 |
3 files changed, 6 insertions, 2 deletions
diff --git a/tests/projects/other/native_module/modules/binary/bar/xmake.lua b/tests/projects/other/native_module/modules/binary/bar/xmake.lua index 7b3ea4032..8f4526071 100644 --- a/tests/projects/other/native_module/modules/binary/bar/xmake.lua +++ b/tests/projects/other/native_module/modules/binary/bar/xmake.lua @@ -1,7 +1,7 @@ add_rules("mode.debug", "mode.release") target("bar") - set_kind("binary") + add_rules("module.binary") add_files("src/*.cpp") diff --git a/tests/projects/other/native_module/xmake.lua b/tests/projects/other/native_module/xmake.lua index 9327d7407..628248534 100644 --- a/tests/projects/other/native_module/xmake.lua +++ b/tests/projects/other/native_module/xmake.lua @@ -3,7 +3,7 @@ add_rules("mode.debug", "mode.release") add_moduledirs("modules") target("test") - add_rules("module.binary") + set_kind("binary") add_files("src/*.cpp") on_config(function (target) -- import("shared.foo") diff --git a/xmake/rules/module/xmake.lua b/xmake/rules/module/xmake.lua index a5c3a1d3b..a3bc9b54f 100644 --- a/xmake/rules/module/xmake.lua +++ b/xmake/rules/module/xmake.lua @@ -20,11 +20,15 @@ rule("module.binary") on_load(function (target) + import("core.project.config") target:set("kind", "binary") + target:set("targetdir", config.buildir()) end) rule("module.shared") on_load(function (target) + import("core.project.config") target:set("kind", "shared") + target:set("targetdir", config.buildir()) end) |
