-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
83 lines (70 loc) · 2.7 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
81
82
83
cmake_minimum_required (VERSION 2.8.12)
project (TREE_SIM)
SET(CMAKE_CXX_FLAGS "-std=c++11 -I/usr/include -I/usr/local/include")
# set common source
set (COMMON_SOURCE
${PROJECT_SOURCE_DIR}/src/QuadraticSplineVisual.cpp
${PROJECT_SOURCE_DIR}/src/QuadraticSplineKinematic.cpp
${PROJECT_SOURCE_DIR}/src/TreeKinematic.cpp
${PROJECT_SOURCE_DIR}/src/LCPSolver.cpp
# ${PROJECT_SOURCE_DIR}/src/timer/LoopTimer.h
# ${PROJECT_SOURCE_DIR}/src/force_sensor/ForceSensorSim.h
# ${PROJECT_SOURCE_DIR}/src/force_sensor/ForceSensorDisplay.h
)
include_directories(${PROJECT_SOURCE_DIR}/src)
# # set common dependencies
# # - eigen3 # must be loaded before chai to avoid a conflict between the system Eigen and the Chai eigen.
# find_package(Eigen3 REQUIRED)
# include_directories(${EIGEN3_INCLUDE_DIR})
# - CHAI3D
find_package(CHAI3D REQUIRED)
include_directories(${CHAI3D_INCLUDE_DIRS})
add_definitions(${CHAI3D_DEFINITIONS})
if (CMAKE_SYSTEM_NAME MATCHES Darwin)
add_definitions(-D_MACOSX -DMACOSX)
elseif (CMAKE_SYSTEM_NAME MATCHES Linux)
add_definitions(-D_LINUX -DLINUX)
endif () #NOTE: Windows is currently unsupported
link_directories(${CHAI3D_LIBRARY_DIRS})
# - SAI2-SIMULATION. TODO: this should not be needed. something fishy.
# find_package(SAI2-SIMULATION REQUIRED)
# include_directories(${SAI2-SIMULATION_INCLUDE_DIRS})
# add_definitions(${SAI2-SIMULATION_DEFINITIONS})
# - SAI2-COMMON
# find_package(SAI2-COMMON REQUIRED)
# include_directories(${SAI2-COMMON_INCLUDE_DIRS})
# add_definitions(${SAI2-COMMON_DEFINITIONS})
# - SAI2-URDF
find_package(SAI2-URDF REQUIRED)
include_directories(${SAI2-URDF_INCLUDE_DIRS})
add_definitions(${SAI2-URDF_DEFINITIONS})
# - SAI2-MODEL
find_package(SAI2-MODEL REQUIRED)
include_directories(${SAI2-MODEL_INCLUDE_DIRS})
add_definitions(${SAI2-MODEL_DEFINITIONS})
# - SAI2-GRAPHICS
find_package(SAI2-GRAPHICS REQUIRED)
include_directories(${SAI2-GRAPHICS_INCLUDE_DIRS})
add_definitions(${SAI2-GRAPHICS_DEFINITIONS})
# - glfw3
find_package(glfw3 QUIET)
find_library(GLFW_LIBRARY glfw)
set(COMMON_LIBRARIES
${CHAI3D_LIBRARIES}
# ${SAI2-COMMON_LIBRARIES}
${SAI2-MODEL_LIBRARIES}
${SAI2-URDF_LIBRARIES}
${SAI2-GRAPHICS_LIBRARIES}
# ${HIREDIS_LIBRARY}
${GLFW_LIBRARY}
)
# add apps
set (CMAKE_RUNTIME_OUTPUT_DIRECTORY ${PROJECT_SOURCE_DIR}/bin)
set (CMAKE_RUNTIME_OUTPUT_DIRECTORY_DEBUG ${PROJECT_SOURCE_DIR}/bin)
set (CMAKE_RUNTIME_OUTPUT_DIRECTORY_MINSIZEREL ${PROJECT_SOURCE_DIR}/bin)
set (CMAKE_RUNTIME_OUTPUT_DIRECTORY_RELEASE ${PROJECT_SOURCE_DIR}/bin)
set (CMAKE_RUNTIME_OUTPUT_DIRECTORY_RELWITHDEBINFO ${PROJECT_SOURCE_DIR}/bin)
set (BINARY_DIR ${PROJECT_SOURCE_DIR}/bin)
add_subdirectory(01-branch)
add_subdirectory(02-simple_tree)
add_subdirectory(03-bare_tree)