-
Notifications
You must be signed in to change notification settings - Fork 4
/
CMakeLists.txt
65 lines (49 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
cmake_minimum_required(VERSION 2.8.3)
project(mocapnet_rosnode)
#We are using a stripped acquisition
add_definitions(-DALL_HEADERS_IN_SAME_DIR)
if(NOT OpenCV_DIR)
find_path(OpenCV_DIR "OpenCVConfig.cmake" DOC "Root directory of OpenCV" HINTS "/opt/ros/noetic/share/OpenCV/")
endif(NOT OpenCV_DIR)
FIND_PACKAGE(OpenCV REQUIRED)
#Force TF2
add_definitions(-DUSE_TENSORFLOW2)
#Force INTEL/AMD build.. ( wont work on ARM )
#add_definitions(-DINTEL_OPTIMIZATIONS)
#set(CMAKE_C_FLAGS "${CMAKE_CXX_FLAGS} -msse3")
#set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -msse2")
#set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -msse3")
add_definitions(-DUSE_OPENCV)
add_definitions(-DUSE_BVH)
set(MOCAPNET_LIBRARIES
"${CMAKE_CURRENT_SOURCE_DIR}/dependencies/MocapNET/libMocapNETLib2.so"
"${CMAKE_CURRENT_SOURCE_DIR}/dependencies/MocapNET/libJointEstimator2D.so"
"${CMAKE_CURRENT_SOURCE_DIR}/dependencies/MocapNET/dependencies/libtensorflow/lib/libtensorflow.so"
"${CMAKE_CURRENT_SOURCE_DIR}/dependencies/MocapNET/dependencies/libtensorflow/lib/libtensorflow_framework.so"
)
find_package(catkin REQUIRED COMPONENTS
sensor_msgs
OpenCV
sensor_msgs
cv_bridge
roscpp
std_msgs
genmsg
image_transport
geometry_msgs
roslib
tf)
#Messages -----------------------------------
#add_message_files(DIRECTORY msg FILES bvhSkeleton.msg )
#Services -----------------------------------
add_service_files(DIRECTORY srv FILES singleFloat.srv )
## Generate added messages and services
generate_messages(DEPENDENCIES std_msgs mocapnet_rosnode)
#This needs to be after generate messages
catkin_package()
include_directories( ${catkin_INCLUDEDIR} ${catkin_INCLUDE_DIRS} ${OpenCV_INCLUDEDIR} "${CMAKE_CURRENT_SOURCE_DIR}/dependencies/MocapNET/dependencies/libtensorflow/include")
add_executable(mocapnet_rosnode src/main.cpp src/bvhGUI2.cpp)
target_link_libraries(mocapnet_rosnode ${catkin_LIBRARIES} ${OpenCV_LIBRARIES} ${MOCAPNET_LIBRARIES} )
add_dependencies(${PROJECT_NAME} ${PROJECT_NAME}_gencpp)
install(TARGETS mocapnet_rosnode RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION})
#install(FILES mocapnet_rosnode.xml DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION})