Skip to content

Commit 60de35b

Browse files
authored
Update quickstart-create-pnp-device.md
Update CMake build command.
1 parent 0cb3ca2 commit 60de35b

File tree

1 file changed

+10
-12
lines changed

1 file changed

+10
-12
lines changed

articles/iot-pnp/quickstart-create-pnp-device.md

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -161,24 +161,22 @@ You build the generated device code stub together with the device SDK. The appli
161161
cd cmake
162162
```
163163
164-
1. Specify the CMake generator based on the build tools you are using:
165-
166-
```cmd\sh
167-
# Either
168-
cmake .. -G "Visual Studio 14 2015" ## For Visual Studio 2015
169-
# or
170-
cmake .. -G "Visual Studio 15 2017" ## For Visual Studio 2017
171-
# or
172-
cmake .. -G "Visual Studio 16 2019" -A Win32
173-
```
174-
175164
1. Run the following commands to build generated code stub:
176165
177166
```cmd\sh
178-
cmake .. -Duse_prov_client=ON -Dhsm_type_symm_key:BOOL=ON -DCMAKE_TOOLCHAIN_FILE="{directory of your Vcpkg repo}\scripts\buildsystems\vcpkg.cmake"
167+
cmake .. -G "Visual Studio 16 2019" -A Win32 -Duse_prov_client=ON -Dhsm_type_symm_key:BOOL=ON -DCMAKE_TOOLCHAIN_FILE="{directory of your Vcpkg repo}\scripts\buildsystems\vcpkg.cmake"
179168
180169
cmake --build .
181170
```
171+
172+
> [!NOTE]
173+
> If you are using Visual Studio 2017 or 2015, you need to specify the CMake generator based on the build tools you are using:
174+
>```cmd\sh
175+
># Either
176+
>cmake .. -G "Visual Studio 15 2017" -Duse_prov_client=ON -Dhsm_type_symm_key:BOOL=ON -DCMAKE_TOOLCHAIN_FILE="{directory of your Vcpkg repo}\scripts\buildsystems\vcpkg.cmake"
177+
># or
178+
>cmake .. -G "Visual Studio 14 2015" -Duse_prov_client=ON -Dhsm_type_symm_key:BOOL=ON -DCMAKE_TOOLCHAIN_FILE="{directory of your Vcpkg repo}\scripts\buildsystems\vcpkg.cmake"
179+
>```
182180
183181
> [!NOTE]
184182
> If cmake can't find your C++ compiler, you get build errors when you run the previous command. If that happens, try running this command at the [Visual Studio command prompt](https://docs.microsoft.com/dotnet/framework/tools/developer-command-prompt-for-vs).

0 commit comments

Comments
 (0)