关于 add_deps 工程构建顺序的问题 #5870
Replies: 1 comment 1 reply
-
add_deps("A", {inherit = false})
before_run(function (target)
local A = target:dep("A")
os.vcp(A:targetfile(), target:targetdir())
end) |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
Leopard-C
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
现有一个工程,需要先构建
A
生成libA.so
,然后构建B
完成后,通过shell脚本将libA.so
复制到指定路径。(通过 dlopen 显式链接,没有编译时的依赖)xmake脚本如下:
xmake -v
执行构建,发现构建工程B
时,会链接libA.so
(-lA
)。使用
add_deps()
语法时,好像会自动链接,如何避免这种链接,或者说,如何能不通过 add_deps 的方式控制工程的构建顺序?Beta Was this translation helpful? Give feedback.
All reactions