X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=docs%2Fdev_guide%2F3_advanced_usage.md;h=f9d9e9033f85c81eede221899e942126a92a41e8;hb=3465ddbdec8d77e2a59315e50f954ea2d35aa1cb;hp=87310b3f5f0d476fb862116814e4144ca419ce03;hpb=c9d3fd48e15d8ba4183c0410706a97769c391c30;p=apps%2Fapp-templates.git diff --git a/docs/dev_guide/3_advanced_usage.md b/docs/dev_guide/3_advanced_usage.md index 87310b3..f9d9e90 100644 --- a/docs/dev_guide/3_advanced_usage.md +++ b/docs/dev_guide/3_advanced_usage.md @@ -31,14 +31,23 @@ Choose between: - **BINDING**: Shared library that be loaded by the AGL Application Framework - **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* of - the target that describe the API with OpenAPI syntax. JSON file will be used - to generate header file using `afb-genskel` tool. -- **HTDOCS**: Root directory of a web app -- **DATA**: Resources used by your application + 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 @@ -48,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