aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--manual.md26
-rw-r--r--zh/manual.md25
2 files changed, 26 insertions, 25 deletions
diff --git a/manual.md b/manual.md
index 7602d84a..ad7fa51a 100644
--- a/manual.md
+++ b/manual.md
@@ -39,7 +39,6 @@ Conditions are generally used to handle some special compilation platforms.
| [is_option](#is_option) | Is the given options enabled? | >= 2.0.1 < 2.2.2 deprecated |
| [is_config](#is_config) | Is the given config values? | >= 2.2.2 |
| [has_config](#has_config) | Is the given configs enabled? | >= 2.2.2 |
-| [get_config](#get_config) | Get the configuration value | >= 2.2.2 |
##### is_os
@@ -315,18 +314,6 @@ This interface can determine not only the built-in global and local configs,
but also the custom options defined through the [option](#option).
</p>
-##### get_config
-
-###### Get the configuration value
-
-This interface is introduced from version 2.2.2 to get the configuration value from the given name.
-
-```lua
-if get_config("myconfig") == "xxx" then
- add_defines("HELLO")
-end
-```
-
#### Global Interfaces
The global interface affects the whole project description scope and all sub-project files.
@@ -343,6 +330,7 @@ The global interface affects the whole project description scope and all sub-pro
| [add_moduledirs](#add_moduledirs) | Add module directories | >= 2.1.5 |
| [add_plugindirs](#add_plugindirs) | Add plugin directories | >= 2.0.1 |
| [add_packagedirs](#add_packagedirs) | Add package directories | >= 2.0.1 |
+| [get_config](#get_config) | Get the configuration value | >= 2.2.2 |
##### includes
@@ -538,6 +526,18 @@ xmake will check these packages automatically and link them if exists, and we ca
$ xmake f --openssl=n
```
+##### get_config
+
+###### Get the configuration value
+
+This interface is introduced from version 2.2.2 to get the configuration value from the given name.
+
+```lua
+if get_config("myconfig") == "xxx" then
+ add_defines("HELLO")
+end
+```
+
#### Project Target
We can use `target("test")` to define a project target named "test", each target generates an executable program, a static library, or a dynamic library.
diff --git a/zh/manual.md b/zh/manual.md
index 45c2610f..1cc00103 100644
--- a/zh/manual.md
+++ b/zh/manual.md
@@ -39,7 +39,6 @@ search: zh
| [is_option](#is_option) | 判断选项是否启用 | >= 2.0.1 < 2.2.2 已废弃 |
| [is_config](#is_config) | 判断指定配置是否为给定的值 | >= 2.2.2 |
| [has_config](#has_config) | 判断配置是否启用或者存在 | >= 2.2.2 |
-| [get_config](#get_config) | 获取给的配置值 | >= 2.2.2 |
##### is_os
@@ -335,17 +334,6 @@ $ xmake f --test1=false
此接口不仅能够判断内置的全局配置、本地配置,同时还可以判断通过[option](#option)定义的自定义配置选项。
</p>
-##### get_config
-
-###### 获取给定的配置值
-
-此接口从2.2.2版本开始引入,用于快速获取给定的配置值,可用于描述域。
-
-```lua
-if get_config("myconfig") == "xxx" then
- add_defines("HELLO")
-end
-```
#### 全局接口
@@ -363,6 +351,7 @@ end
| [add_moduledirs](#add_moduledirs) | 添加模块目录 | >= 2.1.5 |
| [add_plugindirs](#add_plugindirs) | 添加插件目录 | >= 2.0.1 |
| [add_packagedirs](#add_packagedirs) | 添加包目录 | >= 2.0.1 |
+| [get_config](#get_config) | 获取给的配置值 | >= 2.2.2 |
##### includes
@@ -562,6 +551,18 @@ target("tbox")
add_packages("zlib", "polarssl", "pcre", "mysql")
```
+##### get_config
+
+###### 获取给定的配置值
+
+此接口从2.2.2版本开始引入,用于快速获取给定的配置值,可用于描述域。
+
+```lua
+if get_config("myconfig") == "xxx" then
+ add_defines("HELLO")
+end
+```
+
#### 工程目标
定义和设置子工程模块,每个`target`对应一个子工程,最后会生成一个目标程序,有可能是可执行程序,也有可能是库模块。