This modification permits to compile qpOASES on Unix as a shared library, leaving the default compilation to static for backward compatibility. Enabling the BUILD_SHARED_LIBS option in CMake is explicitly disabled as visibility of symbols is not handled in the project, and using CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS (see https://blog.kitware.com/create-dlls-on-windows-without-declspec-using-new-cmake-export-all-feature/) is not working due to the use of some global variables (struct _iobuf * qpOASES::stdFile).
This modification permits to compile qpOASES on Unix as a shared library, leaving the default compilation to static for backward compatibility. Enabling the
BUILD_SHARED_LIBS
option in CMake is explicitly disabled as visibility of symbols is not handled in the project, and usingCMAKE_WINDOWS_EXPORT_ALL_SYMBOLS
(see https://blog.kitware.com/create-dlls-on-windows-without-declspec-using-new-cmake-export-all-feature/) is not working due to the use of some global variables (struct _iobuf * qpOASES::stdFile
).