vsomeip icon indicating copy to clipboard operation
vsomeip copied to clipboard

Allow static libs

Open hefroy opened this issue 2 years ago • 8 comments

  • Remove SHARED option from add_library to allow static libs, CMake then respects the standard BUILD_SHARED_LIBS option.
  • Set the default value of BUILD_SHARED_LIBS to ON.
  • Modify plugin_manager_impl to call the plugin init function for built-in plugins via a hook, whilst still supporting external shared library plugins.
  • Add plugin init hook function to each built-in plugin.
  • Add plugin libs to link libs in CMake export config when static libs are enabled.

hefroy avatar Sep 27 '23 16:09 hefroy

we will check this change internally to see if this is causing any other problems @hefroy coul dyou please rebase your PR to last version of vsomeip-lib? Thanks! cc @fcmonteiro @DiogoPedrozza

goncaloalmeida avatar Nov 10 '23 10:11 goncaloalmeida

Rebased :heavy_check_mark:

hefroy avatar Nov 13 '23 08:11 hefroy

Rebased ✔️

thanks! I will test this PR internally.

goncaloalmeida avatar Nov 13 '23 08:11 goncaloalmeida

These changes are not building on the windows env.: CMake Error at test/network_tests/CMakeLists.txt:4264 (add_dependencies): The dependency target "routingmanagerd" of target "build_network_tests" does not exist.

This seemed to be caused by some other issue on the master branch when I last rebased the branch. I've just rebased it again and now I don't see that CMake error and for me the Windows build compiles ok.

hefroy avatar Dec 13 '23 14:12 hefroy

I created a similar patch for 3.1.20, I was never really happy with it, but maybe we can compare patches.

I don't remember all the details right now, but my CMake changes were much more extensive, and I had to fix the way the singletons (logger, security, etc) were created and remove any lib constructor/destructor. In the end it seemed to work but I had a segfault on exit in examples/routingmanagerd

kheaactua avatar Jan 04 '24 14:01 kheaactua