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
Copy file name to clipboardExpand all lines: goldenmaster/README.md
+73-3
Original file line number
Diff line number
Diff line change
@@ -71,7 +71,7 @@ outputfolder
71
71
| | ...
72
72
└───implementation
73
73
```
74
-
## Build
74
+
## Build for development
75
75
76
76
The template supports two build methods. Depending on your environment you can choose between a [pure CMake](#CMake-pure) approach and additional one with [Conan support](#Conan-support).
77
77
@@ -83,7 +83,7 @@ If you want to manage and install dependencies manually into the environment, th
83
83
#### Windows Setup
84
84
85
85
For ease of use, we use the Conan package manager to install needed dependencies first. [Documentation for Conan](https://conan.io/).
86
-
If you do not want or can use conan, the poco libraries must installed separately.
86
+
If you do not want or can not use conan, the poco libraries must installed separately.
87
87
88
88
1. If you have not done before, install conan 1.x and then set up your profile. The default configuration is usually in your home folder at `.conan/profiles/default`. More details on the conan profile can be found [here](https://docs.conan.io/en/latest/reference/profiles.html).
89
89
This can be set like:
@@ -172,7 +172,7 @@ For ease of use and package distribution we generate all files necessary files t
2. Execute the test script depending on the host platform. This will build all dependencies and module files, including examples.
178
178
* Or on **Linux, Mac** execute the shell script `test_conan.sh`.
@@ -186,6 +186,76 @@ For ease of use and package distribution we generate all files necessary files t
186
186
>test_conan.bat
187
187
```
188
188
189
+
## Build for distribution
190
+
191
+
In some cases you may want to share the build artifacts. The easiest approach is to build everything in release mode and link statically against external libraries.
192
+
In general the following steps are similar to the development build. We use conan to build the static version of the poco libraries.
193
+
194
+
The procedure is almost identical for Windows and Linux, but it is important to use the right path format corresponding to each platform.
195
+
196
+
1. If you have not done before, install conan 1.x and then set up your release profile. More details on the conan profile can be found [here](https://docs.conan.io/en/latest/reference/profiles.html).
197
+
198
+
A new profile can be created like this:
199
+
```
200
+
$ conan profile new release --detect
201
+
```
202
+
203
+
And additionally we need to make platform specific changes to the conan configuration:
The `conan install` step downloads the poco source package, configures it to a minium version and builds it, including its dependencies.
227
+
Also make sure to use the previously created release profile with `--profile release`.
228
+
3. With poco available in the `deps` folder we can configure our project and build it.
229
+
230
+
The `CMAKE_INSTALL_PREFIX` defines the where built files shall be installed. In this example we use `tmp`.
231
+
The `CMAKE_MODULE_PATH` tells CMake where it can find the necessary dependencies like poco. In the previous step we used `deps` - so we specify the full path to the deps folder here, e.g. "/home/user/project/deps" or "C:/workspace/project/deps".
Copy file name to clipboardExpand all lines: templates/README.md
+73-3
Original file line number
Diff line number
Diff line change
@@ -71,7 +71,7 @@ outputfolder
71
71
| | ...
72
72
└───implementation
73
73
```
74
-
## Build
74
+
## Build for development
75
75
76
76
The template supports two build methods. Depending on your environment you can choose between a [pure CMake](#CMake-pure) approach and additional one with [Conan support](#Conan-support).
77
77
@@ -83,7 +83,7 @@ If you want to manage and install dependencies manually into the environment, th
83
83
#### Windows Setup
84
84
85
85
For ease of use, we use the Conan package manager to install needed dependencies first. [Documentation for Conan](https://conan.io/).
86
-
If you do not want or can use conan, the poco libraries must installed separately.
86
+
If you do not want or can not use conan, the poco libraries must installed separately.
87
87
88
88
1. If you have not done before, install conan 1.x and then set up your profile. The default configuration is usually in your home folder at `.conan/profiles/default`. More details on the conan profile can be found [here](https://docs.conan.io/en/latest/reference/profiles.html).
89
89
This can be set like:
@@ -172,7 +172,7 @@ For ease of use and package distribution we generate all files necessary files t
2. Execute the test script depending on the host platform. This will build all dependencies and module files, including examples.
178
178
* Or on **Linux, Mac** execute the shell script `test_conan.sh`.
@@ -186,6 +186,76 @@ For ease of use and package distribution we generate all files necessary files t
186
186
>test_conan.bat
187
187
```
188
188
189
+
## Build for distribution
190
+
191
+
In some cases you may want to share the build artifacts. The easiest approach is to build everything in release mode and link statically against external libraries.
192
+
In general the following steps are similar to the development build. We use conan to build the static version of the poco libraries.
193
+
194
+
The procedure is almost identical for Windows and Linux, but it is important to use the right path format corresponding to each platform.
195
+
196
+
1. If you have not done before, install conan 1.x and then set up your release profile. More details on the conan profile can be found [here](https://docs.conan.io/en/latest/reference/profiles.html).
197
+
198
+
A new profile can be created like this:
199
+
```
200
+
$ conan profile new release --detect
201
+
```
202
+
203
+
And additionally we need to make platform specific changes to the conan configuration:
The `conan install` step downloads the poco source package, configures it to a minium version and builds it, including its dependencies.
227
+
Also make sure to use the previously created release profile with `--profile release`.
228
+
3. With poco available in the `deps` folder we can configure our project and build it.
229
+
230
+
The `CMAKE_INSTALL_PREFIX` defines the where built files shall be installed. In this example we use `tmp`.
231
+
The `CMAKE_MODULE_PATH` tells CMake where it can find the necessary dependencies like poco. In the previous step we used `deps` - so we specify the full path to the deps folder here, e.g. "/home/user/project/deps" or "C:/workspace/project/deps".
0 commit comments