Skip to content

Commit 251ba2e

Browse files
Improved build instructions
1 parent 3dc0ce0 commit 251ba2e

File tree

1 file changed

+20
-13
lines changed

1 file changed

+20
-13
lines changed

src/README.md

Lines changed: 20 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@
22

33
Code includes STTP functionality for both "subscribers" and "publishers".
44

5+
Build instructions follow:
6+
7+
* [Windows](#compiling-in-visual-studio) (using [Visual Studio](https://visualstudio.microsoft.com/))
8+
* [Unix Variants](#compiling-in-linux) (using [CMake](https://cmake.org/))
9+
510
## Compiling in Visual Studio
611

712
To properly compile in Visual Studio, you will need to download Boost:
@@ -14,20 +19,23 @@ project in a folder called _boost_ regardless of version, for example:
1419
STTP API project files:
1520
```
1621
C:\projects\sttp\cppapi
17-
\src
18-
\build
19-
etc...
22+
\src
23+
\build
24+
etc...
2025
```
2126
Boost library files:
2227
```
2328
C:\projects\sttp\boost
24-
\boost
29+
\doc
2530
\libs
2631
etc...
2732
```
2833

2934
If you have an existing Boost installation you can simply create a symbolic
30-
link to the folder, e.g., `mklink /D C:\projects\sttp\boost C:\boost_1_71_0`
35+
link to the folder, e.g.:
36+
```
37+
mklink /D C:\projects\sttp\boost C:\boost_1_71_0
38+
```
3139

3240
Alternately you can adjust the additional include directories to your own
3341
Boost installation location for each of the build configurations. The code
@@ -39,18 +47,17 @@ applications found in:
3947
sttp\cppapi\src\samples
4048
```
4149

42-
The STTP API library uses zlib features of Boost, as a result compiling boost
43-
requires zlib source code that can be downloaded separately: https://zlib.net/
50+
The STTP API library requires the zlib features of Boost, as a result it is necessary
51+
to compile boost with access to zlib source code that can be downloaded separately:
52+
https://zlib.net/
4453

45-
After unzipping the zlib source code, set the following Boost compile script
46-
environmental variables to the root of the zlib source code path, e.g.:
54+
After unzipping the zlib source code and running the Boost `bootstrap.bat` script,
55+
run the `.\b2` build application with the following zlib parameters, adjusting
56+
the paths to the directory where the zlib source code was unzipped:
4757
```
48-
set ZLIB_SOURCE="C:\zlib-1.2.11"
49-
set ZLIB_INCLUDE="C:\zlib-1.2.11"
58+
b2 -s ZLIB_SOURCE="C:\zlib-1.2.11" -s ZLIB_INCLUDE="C:\zlib-1.2.11"
5059
```
5160

52-
Once environmental variables are set for zlib paths, compile Boost as normal.
53-
5461
## Compiling in Linux
5562

5663
The following information is intended to help developers build the STTP API

0 commit comments

Comments
 (0)