summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorruki <[email protected]>2020-10-12 23:17:10 +0800
committerruki <[email protected]>2020-10-12 23:17:10 +0800
commite20646a5231dbf0cd846c978b8209be1bf4214df (patch)
tree06fae33f2991e613f872fc9fab89999ac706a6bf
parent1da28ed7f20d95a4e6aea64a1df3653a82c597c2 (diff)
update readme
-rw-r--r--README.md27
-rw-r--r--README_zh.md27
2 files changed, 40 insertions, 14 deletions
diff --git a/README.md b/README.md
index 4888303ea..34188c7a7 100644
--- a/README.md
+++ b/README.md
@@ -231,7 +231,7 @@ ifort Intel Fortran Compiler
## More Examples
-Debug and release modes:
+#### Debug and release modes
```lua
add_rules("mode.debug", "mode.release")
@@ -244,7 +244,7 @@ target("console")
end
```
-Custom scripts:
+#### Custom scripts
```lua
target("test")
@@ -256,6 +256,8 @@ target("test")
end)
```
+#### Automatic integration of dependent packages
+
Download and use packages in [xmake-repo](https://github.com/xmake-io/xmake-repo) or third-party repositories:
```lua
@@ -267,7 +269,7 @@ target("test")
add_packages("tbox", "libuv", "vcpkg::ffmpeg", "brew::pcre2/libpcre2-8", "openssl")
```
-Qt QuickApp Program:
+#### Qt QuickApp Program
```lua
target("test")
@@ -276,7 +278,7 @@ target("test")
add_files("src/qml.qrc")
```
-Cuda Program:
+#### Cuda Program
```lua
target("test")
@@ -286,7 +288,7 @@ target("test")
add_cugencodes("compute_35")
```
-WDK/UMDF Driver Program:
+#### WDK/UMDF Driver Program
```lua
target("echo")
@@ -302,7 +304,7 @@ target("app")
More wdk driver program examples (umdf/kmdf/wdm), please see [WDK Program Examples](https://xmake.io/#/guide/project_examples?id=wdk-driver-program)
-iOS/MacOS Application:
+#### iOS/MacOS Application
```lua
target("test")
@@ -311,7 +313,7 @@ target("test")
add_files("src/Info.plist")
```
-Framework and Bundle Program (iOS/MacOS):
+#### Framework and Bundle Program (iOS/MacOS)
```lua
target("test")
@@ -320,6 +322,17 @@ target("test")
add_files("src/Info.plist")
```
+#### OpenMP Program
+
+```lua
+add_requires("libomp", {optional = true})
+target("loop")
+ set_kind("binary")
+ add_files("src/*.cpp")
+ add_rules("c++.openmp")
+ add_packages("libomp")
+```
+
## Plugins
#### Generate IDE project file plugin(makefile, vs2002 - vs2019 .. )
diff --git a/README_zh.md b/README_zh.md
index 1c3fcf47c..841edfbbb 100644
--- a/README_zh.md
+++ b/README_zh.md
@@ -233,7 +233,7 @@ ifort Intel Fortran Compiler
## 更多例子
-Debug和Release模式:
+#### Debug 和 Release模式
```lua
add_rules("mode.debug", "mode.release")
@@ -246,7 +246,7 @@ target("console")
end
```
-自定义脚本:
+#### 自定义脚本
```lua
target("test")
@@ -258,6 +258,8 @@ target("test")
end)
```
+#### 依赖包自动集成
+
下载和使用在[xmake-repo](https://github.com/xmake-io/xmake-repo)和第三方包仓库的依赖包:
```lua
@@ -269,7 +271,7 @@ target("test")
add_packages("tbox", "libuv", "vcpkg::ffmpeg", "brew::pcre2/libpcre2-8", "openssl")
```
-Qt QuickApp应用程序:
+#### Qt QuickApp 应用程序
```lua
target("test")
@@ -278,7 +280,7 @@ target("test")
add_files("src/qml.qrc")
```
-Cuda程序:
+#### Cuda 程序
```lua
target("test")
@@ -288,7 +290,7 @@ target("test")
add_cugencodes("compute_35")
```
-WDK/UMDF驱动程序:
+#### WDK/UMDF 驱动程序
```lua
target("echo")
@@ -304,7 +306,7 @@ target("app")
更多WDK驱动程序例子(umdf/kmdf/wdm),见:[WDK工程例子](https://xmake.io/#/zh-cn/guide/project_examples?id=wdk%e9%a9%b1%e5%8a%a8%e7%a8%8b%e5%ba%8f)
-iOS/MacOS应用程序:
+#### iOS/MacOS 应用程序
```lua
target("test")
@@ -313,7 +315,7 @@ target("test")
add_files("src/Info.plist")
```
-Framework和Bundle程序(iOS/MacOS):
+#### Framework 和 Bundle 程序(iOS/MacOS)
```lua
target("test")
@@ -322,6 +324,17 @@ target("test")
add_files("src/Info.plist")
```
+#### OpenMP 程序
+
+```lua
+add_requires("libomp", {optional = true})
+target("loop")
+ set_kind("binary")
+ add_files("src/*.cpp")
+ add_rules("c++.openmp")
+ add_packages("libomp")
+```
+
## 插件
#### 生成IDE工程文件插件(makefile, vs2002 - vs2019, ...)