From eddbfe2e53f6851058533ba268286c9a6f587bbf Mon Sep 17 00:00:00 2001 From: ruki Date: Mon, 7 Aug 2017 09:21:16 +0800 Subject: translate add_packagedirs api in manual --- docs/manual.md | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) (limited to 'docs') diff --git a/docs/manual.md b/docs/manual.md index 9474ac424..2d66497b5 100644 --- a/docs/manual.md +++ b/docs/manual.md @@ -401,15 +401,13 @@ add_plugindirs("$(projectdir)/plugins") ``` xmake will load all plugins in the given directory. -

-Translating ..., help me please! [Edit this page](https://github.com/tboox/xmake/blob/master/docs/manual.md) -

- ##### add_packagedirs ###### Add package directories -通过设置依赖包目录,可以方便的集成一些第三方的依赖库,以tbox工程为例,其包目录如下: +By setting up a dependency package directory, you can easily integrate some third-party dependent libraries, +taking the tbox project as an example, and its package directory is as follows: + ``` tbox.pkg @@ -422,21 +420,31 @@ tbox.pkg - ... ``` -如果要让当前工程识别加载这些包,首先要指定包目录路径,例如: +If you want the current project to load these packages, first specify the package directory path, for example: ```lua add_packagedirs("pkg") ``` -指定好后,就可以在target作用域中,通过[add_packages](#add_packages)接口,来添加集成包依赖了,例如: +Then, please add these packages to the given target by [add_packages](#add_packages): ```lua target("tbox") add_packages("zlib", "polarssl", "pcre", "mysql") ``` +xmake will check these packages automatically and link them if exists, and we can disable them manually. + +```bash +$ xmake f --openssl=n +``` + #### Project Target +

+Translating ..., help me please! [Edit this page](https://github.com/tboox/xmake/blob/master/docs/manual.md) +

+ 定义和设置子工程模块,每个`target`对应一个子工程,最后会生成一个目标程序,有可能是可执行程序,也有可能是库模块。

-- cgit v1.3.1