forked from interaction-lab/openface_ros
-
Notifications
You must be signed in to change notification settings - Fork 7
/
CMakeLists.txt
80 lines (67 loc) · 2.15 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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
cmake_minimum_required(VERSION 2.8.3)
project(openface2_ros)
find_package(catkin REQUIRED COMPONENTS
message_generation
message_runtime
image_transport
cv_bridge
std_msgs
geometry_msgs
sensor_msgs
roscpp
tf2
tf2_ros
)
find_package(Boost 1.5.9 REQUIRED COMPONENTS filesystem system)
find_package(OpenCV 3 REQUIRED)
find_library(OPENFACE_LD_LIB LandmarkDetector)
find_library(OPENFACE_FA_LIB FaceAnalyser)
find_library(OPENFACE_GA_LIB GazeAnalyser)
find_library(OPENFACE_UT_LIB Utilities)
set(OPENFACE_LIBS ${OPENFACE_LD_LIB} ${OPENFACE_FA_LIB} ${OPENFACE_GA_LIB} ${OPENFACE_UT_LIB})
find_path(OPENFACE_INCLUDE_DIR LandmarkDetectorModel.h PATH_SUFFIXES OpenFace)
add_message_files(FILES ActionUnit.msg Face.msg Faces.msg)
generate_messages(DEPENDENCIES std_msgs geometry_msgs)
add_definitions(-std=c++11)
add_definitions(-g -pg)
include_directories(
include
${catkin_INCLUDE_DIRS}
${OPENFACE_INCLUDE_DIR}
${OpenBLAS_INCLUDE_DIR}
${Boost_INCLUDE_DIRS}
${Boost_INCLUDE_DIRS}/boost
${OpenCV_INCLUDE_DIRS}
)
add_executable(openface2_ros src/openface2_ros.cpp)
add_dependencies(openface2_ros ${${PROJECT_NAME}_EXPORTED_TARGETS} ${catkin_EXPORTED_TARGETS})
add_dependencies(openface2_ros openface2_ros_generate_messages_cpp)
add_executable(openface2_ros_single src/openface2_ros_single.cpp)
add_dependencies(openface2_ros_single ${${PROJECT_NAME}_EXPORTED_TARGETS} ${catkin_EXPORTED_TARGETS})
add_dependencies(openface2_ros_single openface2_ros_generate_messages_cpp)
target_link_libraries(openface2_ros
${catkin_LIBRARIES}
${OPENFACE_LIBS}
openblas
dlib
${Boost_LIBRARIES}
${OpenCV_LIBRARIES}
)
install(TARGETS openface2_ros
ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}
)
target_link_libraries(openface2_ros_single
${catkin_LIBRARIES}
${OPENFACE_LIBS}
openblas
dlib
${Boost_LIBRARIES}
${OpenCV_LIBRARIES}
)
install(TARGETS openface2_ros_single
ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}
)