summaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
authorruki <[email protected]>2020-01-10 23:52:51 +0800
committerruki <[email protected]>2020-01-10 17:17:07 +0800
commit9be0f1dacbdcd71aead146a57186f29b62011525 (patch)
treef65babfd67ae68fa2a3a8bef1e8060b382b7e77d /README.md
parent025e86a0a00fc719baed54b53bf33a52d323c832 (diff)
update readme
Diffstat (limited to 'README.md')
-rw-r--r--README.md19
1 files changed, 10 insertions, 9 deletions
diff --git a/README.md b/README.md
index a8742d46c..d7cf0da81 100644
--- a/README.md
+++ b/README.md
@@ -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: