6 To use these templates files on your project just install the reference files using
7 **git submodule** then use `config.cmake` file to configure your project specificities :
10 git submodule add https://gerrit.automotivelinux.org/gerrit/apps/app-templatesconf.d/app-templates conf.d/app-templates
12 cp conf.d/app-templates/cmake/config.cmake.sample conf.d/cmake/config.cmake
15 Edit the copied config.cmake file to fit your needs.
17 Now, create your top CMakeLists.txt file which include `config.cmake` file.
19 An example is available in **app-templates** submodule that you can copy and
23 cp conf.d/app-templates/cmake/CMakeLists.txt CMakeLists.txt
26 ## Create your CMake targets
28 For each target part of your project, you need to use ***PROJECT_TARGET_ADD***
29 to include this target to your project.
31 Using it, make available the cmake variable ***TARGET_NAME*** until the next
32 ***PROJECT_TARGET_ADD*** is invoked with a new target name.
34 So, typical usage defining a target is:
37 PROJECT_TARGET_ADD(SuperExampleName) --> Adding target to your project
39 add_executable/add_library(${TARGET_NAME}.... --> defining your target sources
41 SET_TARGET_PROPERTIES(${TARGET_NAME} PROPERTIES.... --> fit target properties
44 INSTALL(TARGETS ${TARGET_NAME}....
49 You should set properties on your targets that will be used to package your
50 apps in a widget file that could be installed on an AGL system.
52 Specify what is the type of your targets that you want to be included in the
53 widget package with the property **LABELS**:
57 - **BINDING**: Shared library that be loaded by the AGL Application Framework
58 - **HTDOCS**: Root directory of a web app
59 - **DATA**: Resources used by your application
60 - **EXECUTABLE**: Entry point of your application executed by the AGL
64 SET_TARGET_PROPERTIES(${TARGET_NAME}
67 OUTPUT_NAME "file_output_name")
70 > **TIP** you should use the prefix _afb-_ with your **BINDING* targets which
71 > stand for **Application Framework Binding**.