-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
48 lines (39 loc) · 1013 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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
cmake_minimum_required(VERSION 3.16.3)
project(robot_model)
find_package(OpenCV 4.2.0 REQUIRED)
set (SOURCES
src/robot_model/robot_model.cpp
src/robot_model/humanoid_model.cpp
src/robot_model/humanoid_server.cpp
src/robot_model/camera_model.cpp
src/robot_model/leg_ik.cpp
)
#Enable C++17
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++17")
add_library(robot_model ${SOURCES})
target_link_libraries(robot_model PUBLIC
rbdl_urdfreader
cppzmq
rhoban_geometry
sigmaban_model
${OpenCV_LIBS}
)
target_include_directories(robot_model PUBLIC
${OpenCV_INCLUDE_DIRS}
./include
)
add_executable(RobotModel src/main.cpp)
target_link_libraries(RobotModel robot_model)
enable_testing()
set(TESTS
CameraModel
# HumanoidModel
)
if (CATKIN_ENABLE_TESTING)
# create an executable for each test
foreach(test ${TESTS})
string(REPLACE "/" "_" id ${test})
catkin_add_gtest(${id} automated_tests/${test}.cpp)
target_link_libraries(${id} robot_model)
endforeach(test)
endif()