Use variable to handle autobuild target directory
[apps/app-templates.git] / README.md
index aa76f37..b28b90a 100644 (file)
--- a/README.md
+++ b/README.md
@@ -11,8 +11,9 @@ sub CMakeLists.txt installed. Make a globbing search to find source files
 isn't recommended now to handle project build especially in a multiuser
 project because CMake will not be aware of new or removed source files.
 
-You'll find simple usage example for different kind of target under the `examples` folder.
-More advanced usage can be saw with the [low-level-can-service](https://gerrit.automotivelinux.org/gerrit/apps/low-level-can-service)
+You'll find simple usage example for different kind of target under the
+`examples` folder. More advanced usage can be saw with the
+[low-level-can-service](https://gerrit.automotivelinux.org/gerrit/apps/low-level-can-service)
 which mix external libraries, binding.
 
 Typical project architecture
@@ -24,7 +25,15 @@ A typical project architecture would be :
 <project-root-path>
 │
 ├── conf.d/
-│   ├── default/
+│   ├── app-templates/
+│   │   ├── README.md
+│   │   ├── autobuild/
+│   │   │   ├── agl
+│   │   │   │   └── autobuild.sh
+│   │   │   ├── linux
+│   │   │   │   └── autobuild.sh
+│   │   │   └── windows
+│   │   │       └── autobuild.bat
 │   │   ├── cmake/
 │   │   │   ├── config.cmake.sample
 │   │   │   ├── export.map
@@ -42,18 +51,12 @@ A typical project architecture would be :
 │   │       ├── icon-qml.png
 │   │       └── icon-service.png
 │   ├── packaging/
-│   │   ├── config.xml
 │   │   ├── config.spec
 │   │   └── config.deb
-│   ├── autobuild/
-│   │   ├── agl
-│   │   │   └── autobuild.sh
-│   │   ├── linux
-│   │   │   └── autobuild.sh
-│   │   └── windows
-│   │       └── autobuild.bat
-│   ├── README.md
-│   └── config.cmake
+│   ├── cmake
+│   │   └── config.cmake
+│   └── wgt
+│      └── config.xml.in
 ├── <libs>
 ├── <target>
 ├── <target>
@@ -64,7 +67,7 @@ A typical project architecture would be :
 | - | -------| ----------- |
 | \<root-path\> | - | Path to your project. Hold master CMakeLists.txt and general files of your projects. |
 | conf.d | \<root-path\> | Git submodule to app-templates AGL repository which provides CMake helpers macros library, and build scripts. config.cmake is a copy of config.cmake.sample configured for the projects. |
-| default | conf.d | Holds examples files and cmake macros used to build packages |
+| app-templates | conf.d | Holds examples files and cmake macros used to build packages |
 | packaging | conf.d | Contains output files used to build packages. |
 | autobuild | conf.d | Scripts used to build packages the same way for differents platforms. |
 | \<libs\> | \<root-path\> | External dependencies libraries. This isn't to be used to include header file but build and link statically specifics libraries. | Library sources files. Can be a decompressed library archive file or project fork. |
@@ -73,10 +76,11 @@ A typical project architecture would be :
 Usage
 ------
 
-To use these templates files on your project just install the reference files using **git submodule** then use `config.cmake` file to configure your project specificities :
+To use these templates files on your project just install the reference files using
+**git submodule** then use `config.cmake` file to configure your project specificities :
 
 ```bash
-git submodule add https://gerrit.automotivelinux.org/gerrit/apps/app-templates conf.d/default
+git submodule add https://gerrit.automotivelinux.org/gerrit/apps/app-templatesconf.d/app-templates
 ```
 
 Specify manually your targets, you should look at samples provided in this
@@ -84,7 +88,7 @@ repository to make yours. Then when you are ready to build, using `autobuild`
 that will wrap CMake build command:
 
 ```bash
-./conf.d/default/autobuild/agl/autobuild.mk package
+./conf.d/app-templates/autobuild/agl/autobuild.mk package
 ```
 
 Or with the classic way :
@@ -111,7 +115,8 @@ PROJECT_TARGET_ADD(SuperExampleName) --> Adding target to your project
 
 add_executable/add_library(${TARGET_NAME}.... --> defining your target sources
 
-SET_TARGET_PROPERTIES(${TARGET_NAME} PROPERTIES.... --> fit target properties for macros usage
+SET_TARGET_PROPERTIES(${TARGET_NAME} PROPERTIES.... --> fit target properties
+for macros usage
 
 INSTALL(TARGETS ${TARGET_NAME}....
 
@@ -122,7 +127,7 @@ populate_widget() --> add target to widget tree depending upon target properties
 
 #### config.xml.in file
 
-To build a widget you need to configure file _config.xml_. This repo 
+To build a widget you need to configure file _config.xml_. This repo
 provide a simple default file _config.xml.in_ that will be configured using the
 variable set in _config.cmake_  file.
 
@@ -171,7 +176,7 @@ Example:
 PROJECT_TARGET_ADD(low-can-demo)
 ```
 
-> ***NOTE***: This will make available the variable `${TARGET_NAME}` 
+> ***NOTE***: This will make available the variable `${TARGET_NAME}`
 > set with the specificied name. This variable will change at the next call
 > to this macros.
 
@@ -187,9 +192,11 @@ Usage :
 project_subdirs_add()
 ```
 
-You also can specify a globbing pattern as argument to filter which folders will be looked for.
+You also can specify a globbing pattern as argument to filter which folders
+will be looked for.
 
-To filter all directories that begin with a number followed by a dash the anything:
+To filter all directories that begin with a number followed by a dash the
+anything:
 
 ```cmake
 project_subdirs_add("[0-9]-*")
@@ -197,11 +204,14 @@ project_subdirs_add("[0-9]-*")
 
 ### project_targets_populate
 
-Macro use to populate widget tree. To make this works you have to specify some properties to your target :
+Macro use to populate widget tree. To make this works you have to specify some
+properties to your target :
 
 * LABELS : specify *BINDING*, *HTDOCS*, *EXECUTABLE*, *DATA*
-* PREFIX : must be empty **""** when target is a *BINDING* else default prefix *lib* will be applied
-* OUTPUT_NAME : Name of the output file generated, useful when generated file name is different from `${TARGET_NAME}`
+* PREFIX : must be empty **""** when target is a *BINDING* else default prefix
+ *lib* will be applied
+* OUTPUT_NAME : Name of the output file generated, useful when generated file
+ name is different from `${TARGET_NAME}`
 
 Always specify  `populate_widget()` macro as the last statement, especially if
 you use ${TARGET_NAME} variable. Else variable will be set at wrong value with
@@ -227,4 +237,5 @@ project_package_build()
 
 ### project_closing_message
 
-Will display the closing message configured in `config.cmake` file. Put it at the end of your project CMake file.
+Will display the closing message configured in `config.cmake` file. Put it at
+the end of your project CMake file.
\ No newline at end of file