You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This document describes how to use your application CMake configuration to include and build the device C SDK.
4
+
5
+
## C Device SDK Git submodule
6
+
Inclusion of the device C SDK usually uses git submodules to include the SDK into your application source code. For the example project CMake file below, the device C SDK is installed at your root project in a directory called `azure-iot-sdk-c`.
7
+
8
+
## Application CMake project example
9
+
The device C SDK CMake files are configured to be directly referenced from your application CMake. The first step of your application CMake file is to set the SDK configuration options, and then include the SDK in your CMake by adding the `add_subdirectory()` to the SDK location within your project.
10
+
11
+
Below is an example of an application project CMake.txt file which referances the Azure IoT device C SDK source code.
12
+
```Shell
13
+
cmake_minimum_required (VERSION 3.7)
14
+
PROJECT(iothub_device_sample_project C)
15
+
16
+
# Set Azure IoT SDK C settings
17
+
set(use_mqtt ON CACHE BOOL "Set mqtt on" FORCE )
18
+
set(skip_samples ON CACHE BOOL "Set slip_samples on" FORCE )
19
+
set(BUILD_TESTING OFF CACHE BOOL "Set BUILD_TESTING off" FORCE )
20
+
21
+
# Add Azure IoT SDK C
22
+
add_subdirectory(azure-iot-sdk-c out)
23
+
24
+
compileAsC99()
25
+
26
+
set(iothub_project_files
27
+
your_application_file.c
28
+
)
29
+
30
+
#Conditionally use the SDK trusted certs in the samples
Copy file name to clipboardexpand all lines: iothub_client/readme.md
+6
Original file line number
Diff line number
Diff line change
@@ -82,6 +82,12 @@ Detailed instructions can be found below for each platforms:
82
82
83
83
<aname="samples"></a>
84
84
85
+
## CMake
86
+
87
+
The C device SDK uses [CMake](https://cmake.org/) for compiler independent configuration and generates native build files and workspaces that can be used in the compiler environment of your choice.
88
+
89
+
*[SDK CMake integration with your application](../doc/how_to_use_azure_iot_sdk_c_with_cmake.md)
90
+
85
91
## Samples
86
92
87
93
The repository contains a set of simple samples that will help you get started.
Copy file name to clipboardexpand all lines: readme.md
+11-6
Original file line number
Diff line number
Diff line change
@@ -45,7 +45,7 @@ that will impact the SDK's ability to connect to these services. In October 2022
45
45
transition period beforehand where your IoT devices must have both the Baltimore and Digicert public certificates
46
46
which may be hardcoded in their application or flashed onto your WiFi module in order to prevent connectivity issues.
47
47
48
-
**Devices with only the Baltimore public certificate will lose the ability to connect to Azure IoT Hub and Device Provisioning Service in October 2022.**
48
+
> **Devices with only the Baltimore public certificate will lose the ability to connect to Azure IoT Hub and Device Provisioning Service in October 2022.**
49
49
50
50
To prepare for this change, make sure your device's TLS stack has both of these public root of trust certificates configured.
51
51
@@ -54,7 +54,9 @@ For a more in depth explanation as to why the IoT services are doing this, pleas
54
54
55
55
## Getting the SDK
56
56
57
-
Please note, for constrained device scenarios like the below mbed and Arduino, there are better, lighter weight SDK options available. See [Other Azure IoT SDKs](#other-azure-iot-sdks) for more.
57
+
> Please note, for constrained device scenarios like mbed and Arduino, there are better, lighter weight SDK options available. See [Other Azure IoT SDKs](#other-azure-iot-sdks) for more.
58
+
59
+
### Packages
58
60
59
61
The simplest way to get started with the Azure IoT SDKs on supported platforms is to use the following packages and libraries:
60
62
@@ -63,12 +65,15 @@ The simplest way to get started with the Azure IoT SDKs on supported platforms i
63
65
- Windows: [Device SDK on Vcpkg](./doc/setting_up_vcpkg.md#setup-c-sdk-vcpkg-for-windows-development-environment)
64
66
- iOS: [Device SDK on CocoaPod](https://cocoapods.org/pods/AzureIoTHubClient)
65
67
66
-
### iOS Limitations
68
+
*iOS Limitations*
69
+
70
+
- Authentication is limited to SAS keys on iOS. No certificate-based authentication is officially supported.
71
+
- The Device Provisioning Client is not supported on iOS. Only the Azure IoT Hub device client is supported.
67
72
68
-
- Authentication is limited to SAS keys on iOS. No certificate-based authentication is officially supported.
69
-
- The Device Provisioning Client is not supported on iOS. Only the Azure IoT Hub device client is supported.
73
+
### Linux
70
74
71
-
For other platforms - including Linux - you need to clone and build the SDK directly. You may also build it directly for the platforms above. Instructions can be found [here](./iothub_client/readme.md#compile).
75
+
For other platforms - including Linux - you need to clone and build the SDK directly. You may also build it directly for the platforms above.
76
+
- Linux: [Device SDK library on Linux](./iothub_client/readme.md#compile)
0 commit comments