远程库build依赖没办法用解决,或者没有build 文件,如果通过package解决 #3376
niurenyige
started this conversation in
Ideas
Replies: 2 comments 1 reply
-
就是packeage大源代码下载到本地后可以:1.copy 本地的一些文件到package的源代码目录,2.能像target 域那样控制build 过程 |
Beta Was this translation helpful? Give feedback.
0 replies
-
或者用的add_patches 具体多看下 xmake-repo 的包 |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
远程代码库只是系统的子模块,没有build/make 对应,可以通过package 方法下载到本地,然后载本地patch个xmake.lua 文件来编译吗?
比如
目结构:
---submodule1
+xmake.lua
+submodule1.lua
package("lib_submodule1")
set_urls("https://github.com/xxx/submodule1")
add_versions("v2.9.7", "31dd4c0e10fa625b47e27fd6a5295d246c883f214da947b9a4a9e13733905ed9")
on_load(function (package)
end)
after_download(<-------------如果可能增加这部分的hook 调用。这样就可以把本地的一些patch 或者资源配置文件patch 到源代码目录。
//copy 当前目录下 submoule1.lua 到本地目录。cp submodule1.lua package.souce_dir()/xmake.lua
//copy 其他资源文件到 包源代码目录。
)
on_build(
自定义一些build 过程,就像target的那样
)
或者把target的编译过程,也可以应用到package,比如on_config,on_build ,after_build 等。
on_install("macosx", "linux", function (package)
import("package.tools.xmake").install(package)
end)
Beta Was this translation helpful? Give feedback.
All reactions