aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRomain Forlot <romain.forlot@iot.bzh>2017-08-18 10:45:11 +0200
committerRomain Forlot <romain.forlot@iot.bzh>2018-12-13 14:57:57 +0100
commit95f2b59cf3babc9efa3ab7df6033e1a04e41b5b8 (patch)
treed61ad5deba60ce5541eeb1cab130fde4ac25c882
parentc5a169452c50dcf53e27bbf3266d235e8d0eaecb (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.txt19
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}
)