forked from epfl-lasa/control-libraries
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
32 lines (25 loc) · 882 Bytes
/
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
cmake_minimum_required(VERSION 3.9)
project(control_loop_examples)
# Default to C99
if(NOT CMAKE_C_STANDARD)
set(CMAKE_C_STANDARD 99)
endif()
# Default to C++17
if(NOT CMAKE_CXX_STANDARD)
set(CMAKE_CXX_STANDARD 17)
endif()
if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
add_compile_options(-Wall -Wextra -Wpedantic)
endif()
find_package(control_libraries 9.0.1 CONFIG REQUIRED)
set(DEMOS_SCRIPTS
task_space_control_loop
robot_kinematics_control_loop
)
set(FIXTURE_INSTALL_PATH /etc/fixtures/)
install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/fixtures/ DESTINATION ${FIXTURE_INSTALL_PATH})
foreach(SCRIPT ${DEMOS_SCRIPTS})
add_executable(${SCRIPT} cpp_scripts/${SCRIPT}.cpp)
target_link_libraries(${SCRIPT} ${control_libraries_LIBRARIES})
target_compile_definitions(${SCRIPT} PRIVATE SCRIPT_FIXTURES="${FIXTURE_INSTALL_PATH}")
endforeach()