forked from robotology/human-dynamics-estimation
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
55 lines (41 loc) · 2.44 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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
cmake_minimum_required(VERSION 3.1)
project(human-dynamics-estimator CXX)
set(CMAKE_CXX_EXTENSIONS OFF)
# set(CMAKE_CXX_STANDARD 11)
# Generate thrift files
yarp_idl_to_dir("${CMAKE_CURRENT_SOURCE_DIR}/thrifts/HumanDynamics.thrift" "${CMAKE_CURRENT_BINARY_DIR}/autogenerated" THRIFT_SOURCES THRIFT_HEADERS THRIFT_INCLUDE_DIRS)
# Until nobody uses it, make this static
add_library(human-dynamics-estimator-data STATIC ${THRIFT_SOURCES} ${THRIFT_HEADERS})
target_include_directories(human-dynamics-estimator-data SYSTEM PUBLIC ${THRIFT_INCLUDE_DIRS} ${YARP_INCLUDE_DIRS})
target_link_libraries(human-dynamics-estimator-data YARP::YARP_OS YARP::YARP_sig)
set(SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/src/main.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/HumanDynamicsEstimator.cpp)
set(HEADERS ${CMAKE_CURRENT_SOURCE_DIR}/include/HumanDynamicsEstimator.h)
## Declare a C++ executable
add_executable(${PROJECT_NAME} ${SOURCES} ${HEADERS})
if (HUMAN_DYNAMICS_ESTIMATION_DEBUG_MALLOC)
target_compile_definitions(${PROJECT_NAME} PRIVATE "$<$<CONFIG:Debug>:EIGEN_RUNTIME_NO_MALLOC>")
endif()
target_compile_features(${PROJECT_NAME} PRIVATE cxx_auto_type
cxx_range_for)
## Include directories
target_include_directories(${PROJECT_NAME} PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/include)
target_include_directories(${PROJECT_NAME} SYSTEM PRIVATE ${EIGEN3_INCLUDE_DIR} ${YARP_INCLUDE_DIRS})
## Specify targets for the linkage
target_link_libraries(${PROJECT_NAME} human-dynamics-estimator-data
human-forces-provider-data
human-state-provider-data
YARP::YARP_OS
YARP::YARP_init
YARP::YARP_sig
iDynTree::idyntree-core
iDynTree::idyntree-estimation
iDynTree::idyntree-high-level
iDynTree::idyntree-yarp)
add_warnings_configuration_to_target(TARGETS ${PROJECT_NAME} PRIVATE)
yarp_install(FILES conf/human-dynamics-estimator.ini
DESTINATION ${YARP_CONTEXTS_INSTALL_DIR}/human-dynamic-estimation)
install(TARGETS ${PROJECT_NAME}
RUNTIME DESTINATION ${CMAKE_INSTALL_FULL_BINDIR}
ARCHIVE DESTINATION ${CMAKE_INSTALL_FULL_LIBDIR}
LIBRARY DESTINATION ${CMAKE_INSTALL_FULL_LIBDIR})