diff options
author | Romain Forlot <romain.forlot@iot.bzh> | 2017-08-18 10:45:11 +0200 |
---|---|---|
committer | Romain Forlot <romain.forlot@iot.bzh> | 2017-08-18 10:45:11 +0200 |
commit | 31a1f884f0953b3f3819f983b91d7be5fb59fef3 (patch) | |
tree | ebbb2a235a2d87927f50bd6877024ac04dc11d50 | |
parent | 2a46bf245060f86f2c9325f12130711bf4f44890 (diff) |
Latest app-templates features integration
- CMake >= 3.6 mandatory
- Change DATA and HTDOCS targets methods to use macro
add_input_files()
- header generated from OpenAPI file using BINDINGV2 label
and set_openapi_filename() macro.
- Adjusted README to reflect new cmake requirement
Change-Id: I8da515b98c1877d5be5e51f2bf94d691ac3cefb7
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
-rw-r--r-- | CMakeLists.txt | 19 |
1 files changed, 2 insertions, 17 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 7ac0842..d1b430b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -16,18 +16,6 @@ # limitations under the License. ########################################################################### - -# Generate API-v2 hat from OpenAPI json definition -macro(SET_TARGET_GENSKEL TARGET_NAME API_DEF_NAME) - add_custom_command(OUTPUT ${API_DEF_NAME}.h - WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} - DEPENDS ${API_DEF_NAME}.json - COMMAND afb-genskel ${API_DEF_NAME}.json >${API_DEF_NAME}.h - ) - add_custom_target(${API_DEF_NAME}_OPENAPI DEPENDS ${API_DEF_NAME}.h) - add_dependencies(${TARGET_NAME} ${API_DEF_NAME}_OPENAPI) -endmacro(SET_TARGET_GENSKEL) - # Include LUA only when requested if(CONTROL_SUPPORT_LUA) message(STATUS "Notice: LUA Controler Support Selected") @@ -40,14 +28,11 @@ PROJECT_TARGET_ADD(control-afb) # Define project Targets ADD_LIBRARY(${TARGET_NAME} MODULE ctl-binding.c ctl-timer.c ctl-dispatch.c ${CTL_LUA_SOURCE}) - # Generate API-v2 hat from OpenAPI json definition - SET_TARGET_GENSKEL(${TARGET_NAME} ctl-apidef) - - SET_OPENAPI_FILENAME("afb-control-afb") + SET_OPENAPI_FILENAME("ctl-apidef") # Binder exposes a unique public entry point SET_TARGET_PROPERTIES(${TARGET_NAME} PROPERTIES PREFIX "afb-" - LABELS "BINDING" + LABELS "BINDINGV2" LINK_FLAGS ${BINDINGS_LINK_FLAG} OUTPUT_NAME ${TARGET_NAME} ) |