(CMake): fix SDK build
Description
The systematic build of the object library broke the SDK build, because the export was missing for the object library. However, this means users would have to link for instance against fwCore_SHARED_LIB
instead of fwCore
which is the object library. This is counter-intuitive and really not desirable.
We chose to invert the logic. fwCore
is now the shared library and fwCore_obj
is the object library. This solves the problem for external users but not for sight developers who would need to modify all CMakeLists.txt
to link fwCore_obj with 3rd party libraries instead of fwCore. We found a middle-ground by building the object library only when the variable GENERATE_OBJECT_LIB is set. This variable was set for fwRuntime
to enable the build of fwRuntimeDetailTest
. Its CMakeLists.txt
was last modified to link against fwRuntime_obj
instead of fwRuntime
.
On top of that, some corrections were made because of the rework of fwRuntime
and the usage of std::filesystem
.
Closes #516 (closed)
How to test it?
- Run fwRuntimeDetailTest.
- Build the SDK.