Browse Source

Merge pull request #8 from duohappy/master

some revisions
ruki 5 years ago
parent
commit
f903f5caa1
1 changed files with 8 additions and 6 deletions
  1. 8 6
      guide/project_examples.md

+ 8 - 6
guide/project_examples.md

@@ -13,7 +13,7 @@ xmake create --help
 ```lua
 target("test")
     set_kind("binary")
-    add_files("src/*c")
+    add_files("src/*.c")
 ```
 
 For a complete example, execute the following command to create:
@@ -31,7 +31,7 @@ target("library")
 
 target("test")
     set_kind("binary")
-    add_files("src/*c")
+    add_files("src/*.c")
     add_deps("library")
 ```
 
@@ -52,7 +52,7 @@ target("library")
 
 target("test")
     set_kind("binary")
-    add_files("src/*c")
+    add_files("src/*.c")
     add_deps("library")
 ```
 
@@ -177,10 +177,12 @@ v2.2.9 or higher:
 
 ```lua
 target("qt_widgetapp")
-    add_rules("qt.widgetapp")
-    add_files("src/*.cpp")
+    add_rules("qt.widgetapp")
+    add_headerfiles("src/*.h")
+    add_files("src/*.cpp")
     add_files("src/mainwindow.ui")
-    add_files("src/mainwindow.h")  -- add files with Q_OBJECT meta (only for qt.moc)
+    -- add files with Q_OBJECT meta (only for qt.moc)
+    add_files("src/mainwindow.h")
 ```
 
 !> The new version provides the `qt.widgetapp` rule, built-in QtWidgets built-in rules, the use of simpler, the following version of the `qt.application` is still supported, backward compatible: