diff options
| author | ruki <[email protected]> | 2020-01-10 23:52:51 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2020-01-10 17:17:07 +0800 |
| commit | 9be0f1dacbdcd71aead146a57186f29b62011525 (patch) | |
| tree | f65babfd67ae68fa2a3a8bef1e8060b382b7e77d | |
| parent | 025e86a0a00fc719baed54b53bf33a52d323c832 (diff) | |
update readme
| -rw-r--r-- | README.md | 19 | ||||
| -rw-r--r-- | README_zh.md | 19 |
2 files changed, 20 insertions, 18 deletions
@@ -180,26 +180,27 @@ target("console") end ``` -Download and use packages in [xmake-repo](https://github.com/xmake-io/xmake-repo) or third-party repositories: +Custom scripts: ```lua -add_requires("tbox >1.6.1", "libuv master", "vcpkg::ffmpeg", "brew::pcre2/libpcre2-8") -add_requires("conan::OpenSSL/1.0.2n@conan/stable", {alias = "openssl", optional = true, debug = true}) target("test") set_kind("binary") add_files("src/*.c") - add_packages("tbox", "libuv", "vcpkg::ffmpeg", "brew::pcre2/libpcre2-8", "openssl") + after_build(function (target) + print("hello: %s", target:name()) + os.exec("echo %s", target:targetfile()) + end) ``` -Find and use local packages: +Download and use packages in [xmake-repo](https://github.com/xmake-io/xmake-repo) or third-party repositories: ```lua +add_requires("tbox >1.6.1", "libuv master", "vcpkg::ffmpeg", "brew::pcre2/libpcre2-8") +add_requires("conan::OpenSSL/1.0.2n@conan/stable", {alias = "openssl", optional = true, debug = true}) target("test") - set_kind("shared") + set_kind("binary") add_files("src/*.c") - on_load(function (target) - target:add(find_packages("openssl", "brew::pcre2/libpcre2-8", "conan::OpenSSL/1.0.2n@conan/stable")) - end) + add_packages("tbox", "libuv", "vcpkg::ffmpeg", "brew::pcre2/libpcre2-8", "openssl") ``` Qt QuickApp Program: diff --git a/README_zh.md b/README_zh.md index b826f15a9..2390bf72c 100644 --- a/README_zh.md +++ b/README_zh.md @@ -185,26 +185,27 @@ target("console") end ``` -下载和使用在[xmake-repo](https://github.com/xmake-io/xmake-repo)和第三方包仓库的依赖包: +自定义脚本: ```lua -add_requires("tbox >1.6.1", "libuv master", "vcpkg::ffmpeg", "brew::pcre2/libpcre2-8") -add_requires("conan::OpenSSL/1.0.2n@conan/stable", {alias = "openssl", optional = true, debug = true}) target("test") set_kind("binary") add_files("src/*.c") - add_packages("tbox", "libuv", "vcpkg::ffmpeg", "brew::pcre2/libpcre2-8", "openssl") + after_build(function (target) + print("hello: %s", target:name()) + os.exec("echo %s", target:targetfile()) + end) ``` -查找和使用本地已安装的包: +下载和使用在[xmake-repo](https://github.com/xmake-io/xmake-repo)和第三方包仓库的依赖包: ```lua +add_requires("tbox >1.6.1", "libuv master", "vcpkg::ffmpeg", "brew::pcre2/libpcre2-8") +add_requires("conan::OpenSSL/1.0.2n@conan/stable", {alias = "openssl", optional = true, debug = true}) target("test") - set_kind("shared") + set_kind("binary") add_files("src/*.c") - on_load(function (target) - target:add(find_packages("openssl", "brew::pcre2/libpcre2-8", "conan::OpenSSL/1.0.2n@conan/stable")) - end) + add_packages("tbox", "libuv", "vcpkg::ffmpeg", "brew::pcre2/libpcre2-8", "openssl") ``` Qt QuickApp应用程序: |
