xmake 的 import 如何导入父目录中的模块? #6736
Answered
by
star-hengxing
githubnotebooks
asked this question in
Q&A
-
xmake 的 import 使用 比如当前目录结构是: ❯ tree .
.
├── foo.lua
├── src
│ ├── main.cpp
│ └── xmake.lua
└── xmake.lua 最外层的 ❯ cat xmake.lua
add_rules("mode.debug", "mode.release")
includes("src")
❯ cat src/xmake.lua
target("test", function()
set_kind("binary")
add_files("main.cpp")
on_config(function(target)
import("...foo").foo()
end)
end) 我只能在 如果在 |
Beta Was this translation helpful? Give feedback.
Answered by
star-hengxing
Aug 22, 2025
Replies: 1 comment
-
|
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
githubnotebooks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
import("foo", {rootdir = path.join(os.projectdir(), "xxx")})