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.
Remove FactoryDeinit DEINITIALIZER, since it can be called after the runtime has been destroyed when statically linked, causing abort/segfault. Also as it is anyway not called via dlclose and CommonAPI::Runtime when dynamically linked.
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.
Remove FactoryDeinit DEINITIALIZER, since it can be called after the runtime has been destroyed when statically linked, causing abort/segfault. Also as it is anyway not called via dlclose and CommonAPI::Runtime when dynamically linked.