open-simulation-platform / libcosim

OSP C++ co-simulation library
https://open-simulation-platform.github.io/libcosim
Mozilla Public License 2.0
61 stars 10 forks source link

Feature/626 compile static libcosim #627

Closed hplatou closed 3 years ago

hplatou commented 3 years ago

Added Conan option for building libcosim as static library. Also extended build matrix to include shared [True, False]. Please do some basic testing by using libcosim as static (libcosim:shared=False) dependency in consumers.

hplatou commented 3 years ago

Needs fix for merge conflict.

kyllingstad commented 3 years ago

Btw, I tried to test this locally by building cosim CLI with the libcosim:shared=False option. I can confirm that the downloaded libcosim package only contains a static library and that it seems to depend in turn on static libraries, so this PR seems to work as intended.

However, I couldn't build cosim CLI, because its build system doesn't support static linking of Boost. So this would need to be fixed too.