diff options
| author | Victor Romero <romerosanchezv@gmail.com> | 2019-10-11 15:02:03 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-10-11 15:02:03 -0700 |
| commit | 80aa0ab06e6fd488ce230f086d98b32144616cf5 (patch) | |
| tree | 2b1f23ecf60c4231a94f1f2f732283df6554bf2f | |
| parent | fa7a3eaec35409d60dbc456d5229b54c192f11de (diff) | |
| parent | 14cc52167730025e4fd30e15640415c486594d00 (diff) | |
| download | vcpkg-80aa0ab06e6fd488ce230f086d98b32144616cf5.tar.gz vcpkg-80aa0ab06e6fd488ce230f086d98b32144616cf5.zip | |
Merge pull request #8565 from jspaith/iot-provisioning
azure-iot-sdk-c for release of 2019-10-10
| -rw-r--r-- | ports/azure-iot-sdk-c/CONTROL | 5 | ||||
| -rw-r--r-- | ports/azure-iot-sdk-c/cmake-hsm-option.patch | 20 | ||||
| -rw-r--r-- | ports/azure-iot-sdk-c/portfile.cmake | 12 |
3 files changed, 35 insertions, 2 deletions
diff --git a/ports/azure-iot-sdk-c/CONTROL b/ports/azure-iot-sdk-c/CONTROL index 711867a27..7f8f4598b 100644 --- a/ports/azure-iot-sdk-c/CONTROL +++ b/ports/azure-iot-sdk-c/CONTROL @@ -1,8 +1,11 @@ Source: azure-iot-sdk-c -Version: 2019-10-07.1 +Version: 2019-10-11.1 Build-Depends: azure-uamqp-c, azure-umqtt-c, azure-c-shared-utility, parson, azure-uhttp-c, azure-macro-utils-c, umock-c Description: A C99 SDK for connecting devices to Microsoft Azure IoT services Feature: public-preview Description: A version of the azure-iot-sdk-c containing public-preview features. Build-Depends: azure-uamqp-c[public-preview], azure-umqtt-c[public-preview], azure-c-shared-utility[public-preview], azure-uhttp-c[public-preview], azure-macro-utils-c, umock-c + +Feature: use_prov_client +Description: Enables device provisioning client for DPS
\ No newline at end of file diff --git a/ports/azure-iot-sdk-c/cmake-hsm-option.patch b/ports/azure-iot-sdk-c/cmake-hsm-option.patch new file mode 100644 index 000000000..ea6af5c23 --- /dev/null +++ b/ports/azure-iot-sdk-c/cmake-hsm-option.patch @@ -0,0 +1,20 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt
+index b2c51de83..5d42dc441 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -121,9 +121,12 @@ if (${use_prov_client})
+ set(use_prov_client_core ON)
+
+ if ("${hsm_custom_lib}" STREQUAL "")
+- set(hsm_type_x509 ON)
+- set(hsm_type_sastoken ON)
+- set(hsm_type_symm_key ON)
++ if ((NOT ${hsm_type_x509}) AND (NOT ${hsm_type_sastoken}) AND (NOT ${hsm_type_symm_key}))
++ # If the cmake option did not explicitly configure an hsm type, then enable them all.
++ set(hsm_type_x509 ON)
++ set(hsm_type_sastoken ON)
++ set(hsm_type_symm_key ON)
++ endif()
+ else()
+ set(hsm_type_custom ON)
+ endif()
diff --git a/ports/azure-iot-sdk-c/portfile.cmake b/ports/azure-iot-sdk-c/portfile.cmake index 67428789b..98d051e2b 100644 --- a/ports/azure-iot-sdk-c/portfile.cmake +++ b/ports/azure-iot-sdk-c/portfile.cmake @@ -9,7 +9,7 @@ if("public-preview" IN_LIST FEATURES) REF d1cdf78b5160af8e08354e102a6b96395eee79e1 SHA512 0efbfc19e5eef4831b55ded0e8d88e83194bc0f26886841ddc83405c15b7f1bae983e22dc569e22846acd78b843b9e7492883b7c502f4eed92ff80ef45a9942d HEAD_REF public-preview - PATCHES improve-external-deps.patch + PATCHES improve-external-deps.patch cmake-hsm-option.patch ) else() vcpkg_from_github( @@ -22,6 +22,14 @@ else() ) endif() +if("use_prov_client" IN_LIST FEATURES) + message(STATUS "use prov_client") + set(USE_PROV_CLIENT 1) +else() + message(STATUS "NO prov_client") + set(USE_PROV_CLIENT 0) +endif() + file(COPY ${CURRENT_INSTALLED_DIR}/share/azure-c-shared-utility/azure_iot_build_rules.cmake DESTINATION ${SOURCE_PATH}/deps/azure-c-shared-utility/configs/) file(COPY ${SOURCE_PATH}/configs/azure_iot_sdksFunctions.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/cmake/azure_iot_sdks/) @@ -34,6 +42,8 @@ vcpkg_configure_cmake( -Duse_default_uuid=ON -Dbuild_as_dynamic=OFF -Duse_edge_modules=ON + -Duse_prov_client=${USE_PROV_CLIENT} + -Dhsm_type_symm_key=${USE_PROV_CLIENT} ) vcpkg_install_cmake() |
