Skip to content

Commit 2e56844

Browse files
TimmRuppertpmai
andauthored
Apply suggestions from code review
Co-authored-by: Pierre R. Mai <pmai@pmsf.de> Signed-off-by: TimmRuppert <timm.ruppert@persival.de>
1 parent 95d1c0e commit 2e56844

File tree

2 files changed

+16
-8
lines changed

2 files changed

+16
-8
lines changed

doc/setup/setting_up_osi_cpp.adoc

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -30,13 +30,15 @@ Especially for building on Windows, the use of **vcpkg** to handle dependencies
3030

3131
Prerequisites::
3232
* The environment variable `VCPKG_ROOT` must be set to the root of your vcpkg installation.
33-
* For Windows static linking, the static-md triplet is recommended (see also <<static_dynamic_linking, Static/Dynamic Linking>> explained below)
33+
* For Windows static linking, the static-md triplet is recommended (see also <<static_dynamic_linking, Static/Dynamic Linking>> explained below). This is offered via the `vcpkg-windows` CMake preset.
34+
* For other platforms, you can use the `vcpkg` CMake preset for building.
35+
3436

3537
Steps::
36-
. Configure the build using the vcpkg preset:
38+
. Configure the build using the `vcpkg` or `vcpkg-windows` preset:
3739
+
3840
----
39-
cmake --preset default
41+
cmake --preset vcpkg # or vcpkg-windows
4042
----
4143
. Perform the build:
4244
+
@@ -49,15 +51,21 @@ cmake --build build
4951

5052
To build without vcpkg, you must ensure necessary prerequisites are installed and detectable by CMake. It is then usually enough to include the `osi-cpp` repository in your main `CMakeLists.txt`:
5153
----
52-
set(LINK_WITH_SHARED_OSI OFF) # Check linking explaination below
53-
add_subdirectory(lib/osi-cpp)
54+
add_subdirectory(osi-cpp) # Adjust for the relative location of osi-cpp in your project
55+
# Recommended for static linking into a dynamic object (e.g. FMU), see explanations on linking below:
5456
target_link_libraries(YourTarget open_simulation_interface_pic)
57+
# Alternatively, for dynamic linking:
58+
# target_link_libraries(YourTarget open_simulation_interface)
59+
# Alternatively, for static linking into an static executable (not recommended):
60+
# target_link_libraries(YourTarget open_simulation_interface_static)
5561
5662
----
5763

5864
== Static/Dynamic Linking [[static_dynamic_linking]]
5965

60-
Static linking is the recommended way to package OSI FMUs for sharing with others to be integrated in a co-simulation: They should have minimal external dependencies in order to ensure maximum portability. For other use cases dynamic linking could be an option and is thus explained below.
66+
Static linking is the recommended way to package OSI FMUs for sharing with others to be integrated in a co-simulation:
67+
They should have minimal external dependencies in order to ensure maximum portability.
68+
For other use cases dynamic linking could be an option and is thus explained below.
6169

6270
=== Windows
6371

doc/setup/setting_up_osi_python.adoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ endif::[]
55
= Open Simulation Interface (OSI) Python Bindings
66

77

8-
This section explains how to integrate OSI into your own C++ project.
9-
The C++ bindings are available in the separate ttps://github.com/OpenSimulationInterface/osi-python.git[osi-python] repository.
8+
This section explains how to integrate OSI into your own Python project.
9+
The Python bindings are available in the separate https://github.com/OpenSimulationInterface/osi-python.git[osi-python] repository.
1010

1111
== Installing using pip (Recommended)
1212

0 commit comments

Comments
 (0)