-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
26 lines (19 loc) · 1.02 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
cmake_minimum_required(VERSION 3.22)
project(POLIMIcontrol_lib)
set(CMAKE_CXX_STANDARD 20)
list(INSERT CMAKE_MODULE_PATH 0 "${PROJECT_SOURCE_DIR}/CMakeModules")
# Find dependencies
find_package (Eigen3 3.3 REQUIRED NO_MODULE)
find_package (MATIO REQUIRED)
# Generate the library
include_directories(include)
add_library(POLIMIcontrol SHARED continuous_ss.cpp differentiator.cpp discrete_derivative.cpp
discrete_integrator.cpp discrete_ss.cpp discrete_tf.cpp FIR_filter.cpp
util/matfile_fun.cpp controller/PID_controller.cpp controller/PIDISA_controller.cpp
controller/AGS_controller.cpp)
target_link_libraries(POLIMIcontrol matio)
# Install the library
install(DIRECTORY include/ DESTINATION /usr/local/include/POLIMIcontrol)
install(TARGETS POLIMIcontrol EXPORT POLIMIcontrol_lib DESTINATION /usr/local/lib)
install(EXPORT POLIMIcontrol_lib FILE POLIMIcontrol.cmake DESTINATION /usr/local/lib/cmake/POLIMIcontrol)
install(FILES "CMakeModules/POLIMIcontrolConfig.cmake" DESTINATION /usr/local/lib/cmake/POLIMIcontrol)