|
FhSim
3.1.0
Marine systems simulation
|
This page shows how a downstream C++ project consumes FhSim through CMake. The package is distributed with Conan and exposes a standard CMake config package.
For the v2→v3 target changes, see Migrating to FhSim 3.0.
FhSim installs a CMake config package named FhSim:
It provides these imported targets (Conan components in parentheses):
| Target | Component | Use it to |
|---|---|---|
FhSim::simobject | simobject | Build a SimObject plugin library. |
FhSim::fhsim | fhsim | Embed the full simulation engine in your own program. |
FhSim::fhsim_test | fhsim_testtools | Write SimObject/integration tests. |
FhSim::fhsim_vis | fhsim_vis | Add the visualization layer (only when built with visualization). |
FhSim::simobject, not FhSim::fhsim.A SimObject library is built as a MODULE (a runtime-loadable plugin) and links only FhSim::simobject:
See Create a new SimObject library for the plugin/creator structure.
To drive simulations from your own executable, link the full engine:
See Running FhSim from your own software for the embedding API.
Test executables link both the engine and the test-tools target (and GoogleTest):
See Testing for the test API.
Add FhSim to your consumer conanfile.py:
Generate CMake files with CMakeDeps + CMakeToolchain as usual; find_package(FhSim) then resolves against the Conan-provided package. The with_visualization option controls whether FhSim::fhsim_vis is available.