diff options
author | Romain Forlot <romain.forlot@iot.bzh> | 2018-07-18 14:22:56 +0200 |
---|---|---|
committer | Romain Forlot <romain.forlot@iot.bzh> | 2018-10-15 18:22:48 +0200 |
commit | 7f077154ad06e08ee3add756adf53cc36190aaf5 (patch) | |
tree | 4d07e491ed71a23a4f256127e3304bbecfbff373 /cmake/cmake.d | |
parent | 0dfc7f87b215dc12f5314b0df65b3de8f9c97256 (diff) |
Add support to binding version 3.
Add a new LABELS "BINDINGV3" to handle the v3 case. This implies
the same things than for v2 but generates the API definition using
the new version capabilities through afb-genskel tool.
Change-Id: Ib7b60f3f79c3634f27c90b2f9bf4aaf5b3ef2fcb
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
Diffstat (limited to 'cmake/cmake.d')
-rw-r--r-- | cmake/cmake.d/03-macros.cmake | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/cmake/cmake.d/03-macros.cmake b/cmake/cmake.d/03-macros.cmake index ba4c470..e8a95d7 100644 --- a/cmake/cmake.d/03-macros.cmake +++ b/cmake/cmake.d/03-macros.cmake @@ -258,13 +258,16 @@ endmacro() # To be call inside project_targets_populate macro macro(afb_genskel) + set (ARGSLIST ${ARGN}) + if ("${PROJECT_LANGUAGES}" MATCHES "CXX") - list(APPEND GENSKEL_OPTS "--cpp") + list(APPEND ARGSLIST "--cpp") endif() + if (OPENAPI_DEF) add_custom_command(OUTPUT ${SD}/${OPENAPI_DEF}.h DEPENDS ${SD}/${OPENAPI_DEF}.json - COMMAND afb-genskel ${GENSKEL_OPTS} ${SD}/${OPENAPI_DEF}.json > ${SD}/${OPENAPI_DEF}.h + COMMAND afb-genskel ${ARGSLIST} ${SD}/${OPENAPI_DEF}.json > ${SD}/${OPENAPI_DEF}.h ) add_custom_target("${TARGET}_GENSKEL" DEPENDS ${SD}/${OPENAPI_DEF}.h COMMENT "Generating OpenAPI header file ${OPENAPI_DEF}.h") @@ -272,7 +275,7 @@ macro(afb_genskel) else() add_custom_command(OUTPUT ${SD}/${OUT}-apidef.h DEPENDS ${SD}/${OUT}-apidef.json - COMMAND afb-genskel ${GENSKEL_OPTS} ${SD}/${OUT}-apidef.json > ${SD}/${OUT}-apidef.h + COMMAND afb-genskel ${ARGSLIST} ${SD}/${OUT}-apidef.json > ${SD}/${OUT}-apidef.h ) add_custom_target("${TARGET}_GENSKEL" DEPENDS ${SD}/${OUT}-apidef.h COMMENT "Generating OpenAPI header file ${OUT}-apidef.h") @@ -346,7 +349,13 @@ macro(project_targets_populate) if(NOT S) set(S ".so") endif() - afb_genskel() + afb_genskel("-2") + generate_one_populate_target(${P}${OUT}${S} ${PACKAGE_LIBDIR}) + elseif(${T} STREQUAL "BINDINGV3") + if(NOT S) + set(S ".so") + endif() + afb_genskel("-3") generate_one_populate_target(${P}${OUT}${S} ${PACKAGE_LIBDIR}) elseif(${T} STREQUAL "EXECUTABLE") if(NOT S) |