Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Permit to compile qpOASES as a shared library in CMake #109

Merged
merged 1 commit into from
Mar 8, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,12 @@ IF( NOT CMAKE_BUILD_TYPE )
)
ENDIF( NOT CMAKE_BUILD_TYPE )


option(BUILD_SHARED_LIBS "If ON, build shared library instead of static" OFF)
option(QPOASES_BUILD_EXAMPLES "Build examples." ON)

IF(BUILD_SHARED_LIBS AND WIN32)
MESSAGE(FATAL_ERROR "Compiling qpOASES as a shared library in Windows is not supported.")
ENDIF()

############################################################
#################### compiler flags ########################
Expand Down Expand Up @@ -104,7 +107,7 @@ INCLUDE_DIRECTORIES(${PROJECT_SOURCE_DIR}/include)
FILE(GLOB SRC src/*.cpp)

# library
ADD_LIBRARY(qpOASES STATIC ${SRC})
ADD_LIBRARY(qpOASES ${SRC})
INSTALL(TARGETS qpOASES
LIBRARY DESTINATION lib
ARCHIVE DESTINATION lib
Expand Down