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: README.md
+81-2Lines changed: 81 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,14 +5,93 @@ This C++ package provides C++ bindings for the [ASAM Open Simulation Interface](
5
5
6
6
For more information on OSI see the [official documentation](https://opensimulationinterface.github.io/osi-antora-generator/asamosi/latest/specification/index.html) or the [class list](https://opensimulationinterface.github.io/osi-antora-generator/asamosi/latest/gen/annotated.html) for defined protobuf messages.
7
7
8
-
## Usage
8
+
Usage
9
+
-----
10
+
9
11
For usage examples, please refer to the official documentation:
10
12
-[OSMP examples](https://opensimulationinterface.github.io/osi-antora-generator/asamosi/latest/sensor-model/setup/build_install_example.html), including the code found at [osi-sensor-model-packaging](https://github.com/OpenSimulationInterface/osi-sensor-model-packaging):
Especially for building on Windows, the use of [vcpkg](https://vcpkg.io/) to handle dependencies is recommended.
38
+
This can be achieved easily through the use of the CMake `vcpkg` preset when configuring:
39
+
40
+
In order to use the preset the environment variable `VCPKG_ROOT` has to be set to the root of your vcpkg installation.
41
+
This can either be done manually, or through a CMake User preset that inherits from the vcpkg preset, i.e. by providing a `CMakeUserPresets.json` file with the following content:
42
+
43
+
```json
44
+
{
45
+
"version": 3,
46
+
"configurePresets": [
47
+
{
48
+
"name": "default",
49
+
"inherits": "vcpkg",
50
+
"environment": {
51
+
"VCPKG_ROOT": "C:\\vcpkg"
52
+
}
53
+
}
54
+
]
55
+
}
56
+
```
57
+
58
+
When building on windows for inclusion into a DLL, e.g. for FMU generation, you can inherit from the `vcpkg-windows` preset instead of the `vcpkg` preset to build for static linking into a DLL.
59
+
60
+
The build can then be performed in the following manner:
61
+
62
+
- Configure the build:
63
+
64
+
```console
65
+
cmake --preset default
66
+
```
67
+
68
+
- Perform the build:
69
+
70
+
```console
71
+
cmake --build build
72
+
```
73
+
74
+
See the [vcpkg documentation](https://vcpkg.io/) for further information on the use of vcpkg in combination with CMake in various build environments.
75
+
76
+
### Building without vcpkg
77
+
78
+
To build without the use of vcpkg to handle dependencies, you have to ensure that necessary prerequisites are installed and detectable by CMake.
79
+
80
+
Once this has been achieved, the build can be performed in the following manner:
81
+
82
+
- Configure the build:
83
+
84
+
```console
85
+
cmake -B build
86
+
```
87
+
88
+
- Perform the build:
89
+
90
+
```console
91
+
cmake --build build
92
+
```
93
+
94
+
### Further information
16
95
17
96
For detailed installation instructions, please refer to the official documentation:
18
97
-[Setting up OSI](https://opensimulationinterface.github.io/osi-antora-generator/asamosi/latest/interface/setup/setting_up_osi.html)
0 commit comments