aboutsummaryrefslogtreecommitdiffstats
path: root/Controller-afb/CMakeLists.txt
diff options
context:
space:
mode:
authorRomain Forlot <romain.forlot@iot.bzh>2017-08-18 10:45:11 +0200
committerRomain Forlot <romain.forlot@iot.bzh>2017-08-18 10:45:11 +0200
commit3648e16e17a908e7f08bde789fefe3abc6981544 (patch)
tree46423715d06b9c166d3b07fed070fcf077114f8f /Controller-afb/CMakeLists.txt
parent6fa8948541948946e3b3e4d93d064e15e33f8e97 (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>
Diffstat (limited to 'Controller-afb/CMakeLists.txt')
-rw-r--r--Controller-afb/CMakeLists.txt19
1 files changed, 2 insertions, 17 deletions
diff --git a/Controller-afb/CMakeLists.txt b/Controller-afb/CMakeLists.txt
index 7ac0842..d1b430b 100644
--- a/Controller-afb/CMakeLists.txt
+++ b/Controller-afb/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}
)