diff options
author | takeshi_hoshina <takeshi_hoshina@mail.toyota.co.jp> | 2020-11-02 11:07:33 +0900 |
---|---|---|
committer | takeshi_hoshina <takeshi_hoshina@mail.toyota.co.jp> | 2020-11-02 11:07:33 +0900 |
commit | 1c7d6584a7811b7785ae5c1e378f14b5ba0971cf (patch) | |
tree | cd70a267a5ef105ba32f200aa088e281fbd85747 /external/meta-iot-cloud/recipes-azure/azure-iot-sdk-c | |
parent | 4204309872da5cb401cbb2729d9e2d4869a87f42 (diff) |
basesystem-jjsandbox/ToshikazuOhiwa/master-jj
recipes
Diffstat (limited to 'external/meta-iot-cloud/recipes-azure/azure-iot-sdk-c')
4 files changed, 154 insertions, 0 deletions
diff --git a/external/meta-iot-cloud/recipes-azure/azure-iot-sdk-c/azure-iot-sdk-c.inc b/external/meta-iot-cloud/recipes-azure/azure-iot-sdk-c/azure-iot-sdk-c.inc new file mode 100644 index 00000000..547e0b0a --- /dev/null +++ b/external/meta-iot-cloud/recipes-azure/azure-iot-sdk-c/azure-iot-sdk-c.inc @@ -0,0 +1,38 @@ +inherit cmake + +DEPENDS = "\ + azure-c-shared-utility \ + parson \ +" + +SRC_URI += "\ + file://Fix-cmake-build-issues.patch \ + file://Use-provided-parson-lib.patch \ +" + +S = "${WORKDIR}/git" +B = "${WORKDIR}/build" + +PACKAGECONFIG ??= "amqp http mqtt" +PACKAGECONFIG[amqp] = "-Duse_amqp:BOOL=ON, -Duse_amqp:BOOL=OFF, azure-uamqp-c" +PACKAGECONFIG[edge] = "-Duse_edge_modules:BOOL=ON, -Duse_edge_modules:BOOL=OFF, azure-uhttp-c" +PACKAGECONFIG[http] = "-Duse_http:BOOL=ON, -Duse_http:BOOL=OFF, azure-uhttp-c" +PACKAGECONFIG[mqtt] = "-Duse_mqtt:BOOL=ON, -Duse_mqtt:BOOL=OFF, azure-umqtt-c" + +EXTRA_OECMAKE = "\ + -Dbuild_as_dynamic:BOOL=ON \ + -Dskip_samples:BOOL=ON \ + -Duse_installed_dependencies:BOOL=ON \ + -Dbuild_service_client:BOOL=OFF \ + -Dbuild_provisioning_service_client:BOOL=OFF \ +" + +sysroot_stage_all_append () { + sysroot_stage_dir ${D}${exec_prefix}/cmake ${SYSROOT_DESTDIR}${exec_prefix}/cmake +} + +FILES_${PN}-dev += "\ + ${exec_prefix}/cmake \ +" + +BBCLASSEXTEND = "native nativesdk" diff --git a/external/meta-iot-cloud/recipes-azure/azure-iot-sdk-c/azure-iot-sdk-c_1.3.8.bb b/external/meta-iot-cloud/recipes-azure/azure-iot-sdk-c/azure-iot-sdk-c_1.3.8.bb new file mode 100644 index 00000000..c04440a6 --- /dev/null +++ b/external/meta-iot-cloud/recipes-azure/azure-iot-sdk-c/azure-iot-sdk-c_1.3.8.bb @@ -0,0 +1,13 @@ +DESCRIPTION = "Microsoft Azure IoT SDKs and libraries for C" +AUTHOR = "Microsoft Corporation" +HOMEPAGE = "https://github.com/Azure/azure-iot-sdk-c" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://LICENSE;md5=4283671594edec4c13aeb073c219237a" + +SRC_URI = "\ + git://github.com/Azure/azure-iot-sdk-c.git;rev=a8a71c2d120c571a2d2ab6149863c2b075e7bea9 \ +" + +PR = "r0" + +include ${BPN}.inc diff --git a/external/meta-iot-cloud/recipes-azure/azure-iot-sdk-c/files/Fix-cmake-build-issues.patch b/external/meta-iot-cloud/recipes-azure/azure-iot-sdk-c/files/Fix-cmake-build-issues.patch new file mode 100644 index 00000000..e57a9499 --- /dev/null +++ b/external/meta-iot-cloud/recipes-azure/azure-iot-sdk-c/files/Fix-cmake-build-issues.patch @@ -0,0 +1,25 @@ +From e41c3783d1fdbca9572fcb386c9c16663dc7cc63 Mon Sep 17 00:00:00 2001 +From: Scott Ware <scott.r.ware@intel.com> +Date: Thu, 8 Nov 2018 14:08:34 +0000 +Subject: [PATCH 2/3] Fix cmake build issues + +Signed-off-by: Scott Ware <scott.r.ware@intel.com> +--- + iothub_client/CMakeLists.txt | 1 - + 1 files changed, 0 insertions(+), 1 deletions(-) + +diff --git a/iothub_client/CMakeLists.txt b/iothub_client/CMakeLists.txt +index 99e74dd..20eccd2 100644 +--- a/iothub_client/CMakeLists.txt ++++ b/iothub_client/CMakeLists.txt +@@ -332,7 +332,6 @@ if(${use_amqp}) + ${iothub_client_amqp_ws_transport_c_files} + ${iothub_client_amqp_ws_transport_h_files}) + +- set(iothub_client_libs ${iothub_client_libs} uamqp) + endif(build_as_dynamic) + endif() + +-- +2.7.4 + diff --git a/external/meta-iot-cloud/recipes-azure/azure-iot-sdk-c/files/Use-provided-parson-lib.patch b/external/meta-iot-cloud/recipes-azure/azure-iot-sdk-c/files/Use-provided-parson-lib.patch new file mode 100644 index 00000000..91422c62 --- /dev/null +++ b/external/meta-iot-cloud/recipes-azure/azure-iot-sdk-c/files/Use-provided-parson-lib.patch @@ -0,0 +1,78 @@ +From 59c9388e3800b9e07fd387dbdc3e26b7242ed6ea Mon Sep 17 00:00:00 2001 +From: Scott Ware <scott.r.ware@intel.com> +Date: Fri, 17 Apr 2020 17:52:08 +0100 +Subject: [PATCH 2/2] Use provided parson lib + +Signed-off-by: Scott Ware <scott.r.ware@intel.com> +--- + CMakeLists.txt | 26 -------------------------- + dependencies.cmake | 3 +++ + 2 files changed, 3 insertions(+), 26 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index e92da5c..04e185a 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -177,17 +177,6 @@ endif() + # Use solution folders. + set_property(GLOBAL PROPERTY USE_FOLDERS ON) + +-# build the parson library for json parsing +-add_library(parson +- ./deps/parson/parson.c +- ./deps/parson/parson.h +-) +-if (MSVC) +- set_source_files_properties(../deps/parson/parson.c PROPERTIES COMPILE_FLAGS "/wd4244 /wd4232") +-endif() +-set(parson_h_install_files ./deps/parson/parson.h) +-set(parson_install_libs parson) +- + if (IN_OPENWRT) + ADD_DEFINITIONS("$ENV{TARGET_LDFLAGS}" "$ENV{TARGET_CPPFLAGS}" "$ENV{TARGET_CFLAGS}") + INCLUDE_DIRECTORIES("$ENV{TOOLCHAIN_DIR}/usr/include" "$ENV{TARGET_LDFLAGS}" "$ENV{TARGET_CPPFLAGS}" "$ENV{TARGET_CFLAGS}") +@@ -419,15 +408,6 @@ if (${use_installed_dependencies}) + COPYONLY + ) + +- install(FILES ${parson_h_install_files} +- DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/azureiot +- ) +- install(TARGETS ${parson_install_libs} EXPORT azure_iot_sdksTargets +- ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} +- LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} +- INCLUDES DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/azureiot +- ) +- + install(EXPORT azure_iot_sdksTargets + FILE + "${PROJECT_NAME}Targets.cmake" +@@ -443,11 +423,5 @@ if (${use_installed_dependencies}) + DESTINATION + ${package_location} + ) +-else() +- install(FILES ${parson_h_install_files} +- DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/azureiot) +- install(TARGETS ${parson_install_libs} +- ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} +- LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}) + endif() + +diff --git a/dependencies.cmake b/dependencies.cmake +index fd06df6..22ba6af 100644 +--- a/dependencies.cmake ++++ b/dependencies.cmake +@@ -18,6 +18,9 @@ if(${use_installed_dependencies}) + endif () + endif () + ++ if (NOT parson_FOUND) ++ find_package(parson REQUIRED CONFIG) ++ endif () + else () + add_subdirectory(c-utility) + +-- +2.7.4 + |