瀏覽代碼

update config to configs

paste 4 年之前
父節點
當前提交
d9df2cccd3

+ 2 - 2
manual/global_interfaces.md

@@ -253,7 +253,7 @@ add_requires("zlib", {configs = {shared = true}})
 The linux packages installed by default are compiled with pic enabled, which is very useful for relying on static libraries in dynamic libraries, but if you want to disable pic, it is also possible.
 
 ```lua
-add_requires("zlib", {config = {pic = false}})
+add_requires("zlib", {configs = {pic = false}})
 ```
 
 ##### Set vs runtime
@@ -261,7 +261,7 @@ add_requires("zlib", {config = {pic = false}})
 The windows package installed by default is compiled with msvc/MT, if you want to switch to MD, you can configure it as follows:
 
 ```lua
-add_requires("zlib", {config = {vs_runtime = "MD"}})
+add_requires("zlib", {configs = {vs_runtime = "MD"}})
 ```
 
 In addition, it supports four options: MT, MTd, MD, and MDd.

+ 1 - 1
manual/package_instance.md

@@ -331,7 +331,7 @@ version:patch()
 
 ```lua
 -- if configurations are set like so
-add_require("example", {config = {enable_x = true, value_y = 6}})
+add_require("example", {configs = {enable_x = true, value_y = 6}})
 -- these values can be retrieved like so
 -- returns true
 package:config("enable_x")

+ 2 - 2
mirror/manual/global_interfaces.html

@@ -234,11 +234,11 @@ add_requires("tbox dev")
 <p>!> Of course, the premise is that in the definition of this package, there is a judgment and processing of <code>package:config("shared")</code>. In the official xmake-repo repository, it is usually strictly differentiated and supported.</p>
 <h5 id="disablepicsupport">Disable pic support</h5>
 <p>The linux packages installed by default are compiled with pic enabled, which is very useful for relying on static libraries in dynamic libraries, but if you want to disable pic, it is also possible.</p>
-<pre><code class="lang-lua">add_requires("zlib", {config = {pic = false}})
+<pre><code class="lang-lua">add_requires("zlib", {configs = {pic = false}})
 </code></pre>
 <h5 id="setvsruntime">Set vs runtime</h5>
 <p>The windows package installed by default is compiled with msvc/MT, if you want to switch to MD, you can configure it as follows:</p>
-<pre><code class="lang-lua">add_requires("zlib", {config = {vs_runtime = "MD"}})
+<pre><code class="lang-lua">add_requires("zlib", {configs = {vs_runtime = "MD"}})
 </code></pre>
 <p>In addition, it supports four options: MT, MTd, MD, and MDd.</p>
 <p>If there are many dependent packages, it is very troublesome to switch each configuration again. We can also switch through the <code>set_runtimes</code> global setting to take effect for all dependent packages.</p>

+ 1 - 1
mirror/manual/package_instance.html

@@ -370,7 +370,7 @@ version:patch()
 <li>Get the given configuration value of the package</li>
 </ul>
 <pre><code class="lang-lua">-- if configurations are set like so
-add_require("example", {config = {enable_x = true, value_y = 6}})
+add_require("example", {configs = {enable_x = true, value_y = 6}})
 -- these values can be retrieved like so
 -- returns true
 package:config("enable_x")

+ 2 - 2
mirror/zh-cn/manual/global_interfaces.html

@@ -239,11 +239,11 @@ add_requires("tbox dev")
 <p>!> 当然,前提是这个包的定义里面,有对 <code>package:config("shared")</code> 判断处理,官方 xmake-repo 仓库里面,通常都是严格区分支持的。</p>
 <h5 id="pic">禁用 pic 支持</h5>
 <p>默认安装的 linux 包,都是开启 pic 编译的,这对于动态库中依赖静态库非常有用,但如果想禁用 pic,也是可以的。</p>
-<pre><code class="lang-lua">add_requires("zlib", {config = {pic = false}})
+<pre><code class="lang-lua">add_requires("zlib", {configs = {pic = false}})
 </code></pre>
 <h5 id="vsruntime">vs runtime 设置</h5>
 <p>默认安装的 windows 包是采用 msvc/MT 编译的,如果要切换到 MD,可以配置如下:</p>
-<pre><code class="lang-lua">add_requires("zlib", {config = {vs_runtime = "MD"}})
+<pre><code class="lang-lua">add_requires("zlib", {configs = {vs_runtime = "MD"}})
 </code></pre>
 <p>另外,还支持:MT, MTd, MD, MDd 四种选项。</p>
 <p>如果依赖的包很多,每个配置切换一遍非常的麻烦,我们也可以通过 <code>set_runtimes</code> 全局设置切换,对所有依赖包生效。</p>

+ 1 - 1
mirror/zh-cn/manual/package_instance.html

@@ -370,7 +370,7 @@ version:patch()
 <li>获取包的给定配置值</li>
 </ul>
 <pre><code class="lang-lua">-- if configurations are set like so
-add_require("example", {config = {enable_x = true, value_y = 6}})
+add_require("example", {configs = {enable_x = true, value_y = 6}})
 -- these values can be retrieved like so
 -- returns true
 package:config("enable_x")

+ 2 - 2
zh-cn/manual/global_interfaces.md

@@ -266,7 +266,7 @@ add_requires("zlib", {configs = {shared = true}})
 默认安装的 linux 包,都是开启 pic 编译的,这对于动态库中依赖静态库非常有用,但如果想禁用 pic,也是可以的。
 
 ```lua
-add_requires("zlib", {config = {pic = false}})
+add_requires("zlib", {configs = {pic = false}})
 ```
 
 ##### vs runtime 设置
@@ -274,7 +274,7 @@ add_requires("zlib", {config = {pic = false}})
 默认安装的 windows 包是采用 msvc/MT 编译的,如果要切换到 MD,可以配置如下:
 
 ```lua
-add_requires("zlib", {config = {vs_runtime = "MD"}})
+add_requires("zlib", {configs = {vs_runtime = "MD"}})
 ```
 
 另外,还支持:MT, MTd, MD, MDd 四种选项。

+ 1 - 1
zh-cn/manual/package_instance.md

@@ -330,7 +330,7 @@ version:patch()
 
 ```lua
 -- if configurations are set like so
-add_require("example", {config = {enable_x = true, value_y = 6}})
+add_require("example", {configs = {enable_x = true, value_y = 6}})
 -- these values can be retrieved like so
 -- returns true
 package:config("enable_x")