Skip to content

Commit c6d8d59

Browse files
authored
Merge pull request #91 from thomassedlmayer/doc/protobuf-build-instructions
Doc/protobuf build instructions
2 parents 3d04e72 + d17b705 commit c6d8d59

1 file changed

Lines changed: 13 additions & 18 deletions

File tree

doc/setup/build_install_example.adoc

Lines changed: 13 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -40,32 +40,27 @@ cd osi-sensor-model-packaging
4040
git submodule update --init
4141
----
4242
+
43-
. Switch to the `examples/` directory.
43+
. Run cmake and build
44+
.. If you followed the protobuf installation instructions for Windows using vcpkg, you can use the built protobuf libraries to automatically build the examples by specifying the triplet and toolchain file from VCPKG on the cmake configuration command-line:
4445
+
4546
----
4647
cd examples
47-
----
48-
+
49-
. Create a new directory called `build/`.
50-
+
51-
----
52-
mkdir -p build
53-
----
54-
+
55-
. Switch to the `build/` directory.
56-
+
57-
----
48+
mkdir build
5849
cd build
50+
cmake .. -DVCPKG_TARGET_TRIPLET=x64-windows-static-md -DCMAKE_TOOLCHAIN_FILE=../../../vcpkg/scripts/buildsystems/vcpkg.cmake
51+
cmake –-build .
5952
----
6053
+
61-
. Run _cmake_ in the parent directory.
54+
55+
The CMAKE_TOOLCHAIN_FILE must point to your vcpkg directory, which in this example was parallel to the osi-sensor-model-packaging directory.
56+
57+
.. If you did not install and build protobuf using vcpkg, use:
6258
+
6359
----
60+
cd examples
61+
mkdir build
62+
cd build
6463
cmake ..
65-
----
66-
+
67-
. Run _cmake_ build.
68-
+
69-
----
7064
cmake --build .
7165
----
66+
+

0 commit comments

Comments
 (0)