@@ -27,45 +27,67 @@ __Jump To:__
27
27
28
28
### Minimum Requirements
29
29
* C++ 11 or higher
30
+ * Clang 3.9+ or GCC 4.8+ or MSVC 2015+
30
31
* CMake 3.1+
31
- * Clang 3.9+ or GCC 4.8+ or MSVC 2015+
32
32
33
33
[ Step-by-step instructions] ( ./PREREQUISITES.md )
34
34
35
35
36
36
### Build from source
37
37
38
- #### Automatically Build and Install AWS Dependencies
39
-
40
- Note: ` -DCMAKE_INSTALL_PREFIX ` can be any path where the project needs to be installed. Taking sdk-cpp-workspace as an example here.
41
-
42
38
#### MacOS and Linux
43
39
44
40
``` sh
45
- mkdir sdk-cpp-workspace
46
- cd sdk-cpp-workspace
41
+ # Create a workspace directory to hold all the SDK files
42
+ mkdir sdk-workspace
43
+ cd sdk-workspace
44
+ # Clone the repository
47
45
git clone --recursive https://github.com/aws/aws-iot-device-sdk-cpp-v2.git
46
+ # Ensure all submodules are properly updated
47
+ cd aws-iot-device-sdk-cpp-v2
48
+ git submodule update --init --recursive
49
+ cd ..
50
+ # Make a build directory for the SDK. Can use any name.
51
+ # If working with multiple SDKs, using a SDK-specific name is helpful.
48
52
mkdir aws-iot-device-sdk-cpp-v2-build
49
53
cd aws-iot-device-sdk-cpp-v2-build
50
- cmake -DCMAKE_INSTALL_PREFIX=" <absolute path sdk-cpp-workspace dir>" -DCMAKE_BUILD_TYPE=" <Release|RelWithDebInfo|Debug>" ../aws-iot-device-sdk-cpp-v2
54
+ # Generate the SDK build files.
55
+ # -DCMAKE_INSTALL_PREFIX needs to be the absolute/full path to the directory.
56
+ # (Example: "/Users/example/sdk-workspace/).
57
+ # -DCMAKE_BUILD_TYPE can be "Release", "RelWithDebInfo", or "Debug"
58
+ cmake -DCMAKE_INSTALL_PREFIX=" <absolute path to sdk-workspace>" -DCMAKE_BUILD_TYPE=" Debug" ../aws-iot-device-sdk-cpp-v2
59
+ # Build and install the library. Once installed, you can develop with the SDK and run the samples
51
60
cmake --build . --target install
52
61
```
53
62
54
63
#### Windows
55
64
56
65
``` sh
57
- mkdir sdk-cpp-workspace
66
+ # Create a workspace directory to hold all the SDK files
67
+ mkdir sdk-workspace
58
68
cd sdk-cpp-workspace
69
+ # Clone the repository
59
70
git clone --recursive https://github.com/aws/aws-iot-device-sdk-cpp-v2.git
71
+ # Ensure all submodules are properly updated
72
+ cd aws-iot-device-sdk-cpp-v2
73
+ git submodule update --init --recursive
74
+ cd ..
75
+ # Make a build directory for the SDK. Can use any name.
76
+ # If working with multiple SDKs, using a SDK-specific name is helpful.
60
77
mkdir aws-iot-device-sdk-cpp-v2-build
61
78
cd aws-iot-device-sdk-cpp-v2-build
79
+ # Generate the SDK build files.
80
+ # -DCMAKE_INSTALL_PREFIX needs to be the absolute/full path to the directory.
81
+ # (Example: "C:/users/example/sdk-workspace/).
62
82
cmake -DCMAKE_INSTALL_PREFIX=" <absolute path sdk-cpp-workspace dir>" ../aws-iot-device-sdk-cpp-v2
63
- cmake --build . --target install --config " <Release|RelWithDebInfo|Debug>"
83
+ # Build and install the library. Once installed, you can develop with the SDK and run the samples
84
+ # -config can be "Release", "RelWithDebInfo", or "Debug"
85
+ cmake --build . --target install --config " Debug"
64
86
```
65
87
66
- Due to maximum path length limitations in the Windows API, we recommend cloning to a short path like: ` C:\dev\iotsdk `
67
-
68
- ` --config ` is only REQUIRED for multi-configuration build tools (VisualStudio/MsBuild being the most common).
88
+ ** Windows specific notes ** :
89
+ * Due to maximum path length limitations in the Windows API, we recommend cloning to a short path like: ` C:\dev\iotsdk `
90
+ * ` --config ` is only REQUIRED for multi-configuration build tools (VisualStudio/MsBuild being the most common).
69
91
70
92
## Samples
71
93
0 commit comments