-
Notifications
You must be signed in to change notification settings - Fork 1
/
CMakeLists.txt
41 lines (33 loc) · 1.06 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
cmake_minimum_required(VERSION 2.8.3)
cmake_policy(SET CMP0042 NEW)
project(qpoases_embedded)
if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
set(CMAKE_BUILD_TYPE Release CACHE STRING "Choose the type of build." FORCE)
set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS
"Debug" "Release" "MinSizeRel" "RelWithDebInfo")
endif()
option(QPOASES_DEBUG "Enables debug messages." OFF)
# Add -Wconversion -Wsign-conversion -Wshadow.
add_compile_options(-std=c++17 -Wall -Wextra -Wpedantic -Wfloat-equal -Werror)
include_directories(include)
add_library(${PROJECT_NAME} SHARED
src/Bounds.cpp
src/Constraints.cpp
src/Indexlist.cpp
src/MessageHandling.cpp
src/QProblem.cpp
src/QProblemB.cpp
src/SubjectTo.cpp
)
if (QPOASES_DEBUG)
target_compile_definitions(${PROJECT_NAME} PRIVATE QPOASES_DEBUG)
endif()
install(DIRECTORY include/${PROJECT_NAME}/
DESTINATION include/${PROJECT_NAME}
PATTERN include/qpoases_embedded/Utils.* EXCLUDE
)
install(TARGETS ${PROJECT_NAME}
ARCHIVE DESTINATION lib
LIBRARY DESTINATION lib
RUNTIME DESTINATION bin
)