X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=docs%2Fdev_guide%2F3_advanced_usage.md;h=f9d9e9033f85c81eede221899e942126a92a41e8;hb=b05e4422c52fe1e80c9552f2057c8c817c4d2fe4;hp=8994b41391ee9f4eae7f0cfe39d3b118ada6dedd;hpb=b1bb356be470cfc10a0d9457166ad21af0bd3f19;p=apps%2Fapp-templates.git diff --git a/docs/dev_guide/3_advanced_usage.md b/docs/dev_guide/3_advanced_usage.md index 8994b41..f9d9e90 100644 --- a/docs/dev_guide/3_advanced_usage.md +++ b/docs/dev_guide/3_advanced_usage.md @@ -30,11 +30,24 @@ application, macros make the difference using ***LABELS*** property. Choose between: - **BINDING**: Shared library that be loaded by the AGL Application Framework -- **HTDOCS**: Root directory of a web app -- **DATA**: Resources used by your application +- **BINDINGV2**: Shared library that be loaded by the AGL Application Framework. + This has to be accompagnied with a JSON file named like the *${OUTPUT_NAME}-apidef* of + the target that describe the API with OpenAPI syntax (e.g: *mybinding-apidef*). + Or you can choose the name by setting the *CACHE* cmake variable *OPENAPI_DEF* + (***CAUTION***: setting a CACHE variable is needed, or set a normal variable + with the *PARENT_SCOPE* option to make it visible for the parent scope + where the target is defined) JSON file will be used to generate header file + using `afb-genskel` tool. +- **HTDOCS**: Root directory of a web app. This target has to build its + directory and puts its files in the ${CMAKE_CURRENT_BINARY_DIR}/${TARGET_NAME} +- **DATA**: Resources used by your application. This target has to build its + directory and puts its files in the ${CMAKE_CURRENT_BINARY_DIR}/${TARGET_NAME} - **EXECUTABLE**: Entry point of your application executed by the AGL Application Framework +> **TIP** you should use the prefix _afb-_ with your **BINDING* targets which +> stand for **Application Framework Binding**. + Example: ```cmake @@ -44,13 +57,9 @@ SET_TARGET_PROPERTIES(${TARGET_NAME} PROPERTIES ) ``` -If your target output is not named as the ***TARGET_NAME***, you need to specify -***OUTPUT_NAME*** property that will be used by the ***populate_widget*** macro. - -Use the ***populate_widget*** macro as latest statement of your target -definition. Then at the end of your project definition you should use the macro -***build_widget*** that make an archive from the populated widget tree using the -`wgtpkg-pack` Application Framework tools. +> **NOTE**: You doesn't need to specify an **INSTALL** command for these +> targets. This is already handle by template and will be installed in the +> following path : **${CMAKE_INSTALL_PREFIX}/${PROJECT_NAME}** ## Macro reference