-
Notifications
You must be signed in to change notification settings - Fork 1
/
CMakeLists.txt
97 lines (81 loc) · 2.94 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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
# \file CMakeLists.txt
# \author Thibaut Mattio <[email protected]>
# \date 08/05/2015
#
# \copyright Copyright (c) 2015 S.O.N.I.A. All rights reserved.
#
# \section LICENSE
#
# This file is part of S.O.N.I.A. software.
#
# S.O.N.I.A. software is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# S.O.N.I.A. software is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with S.O.N.I.A. software. If not, see <http://www.gnu.org/licenses/>.
#===============================================================================
# G L O B A L P R O J E C T C O N F I G U R A T I O N
cmake_minimum_required(VERSION 2.8.3)
project(provider_depth)
if (NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE Debug CACHE STRING
"Choose the type of build, options are: None Debug Release RelWithDebInfo MinSizeRel."
FORCE)
endif (NOT CMAKE_BUILD_TYPE)
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -std=c++11 -Wall")
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -std=c++11 -O3 -s")
set(provider_depth_SRC_DIR "src")
#===============================================================================
# C A T K I N C O N F I G U R A T I O N
find_package(catkin REQUIRED COMPONENTS
roscpp
self_test
diagnostic_updater
tf
std_msgs
sensor_msgs
message_generation
sonia_common
)
find_library(LOG4CXX_LIBRARY log4cxx)
if (NOT LOG4CXX_LIBRARY)
message(FATAL_ERROR "Couldn't find log4cxx library")
endif ()
catkin_package(
INCLUDE_DIRS ${provider_depth_SRC_DIR}
LIBRARIES
CATKIN_DEPENDS
roscpp
self_test
diagnostic_updater
tf
std_msgs
sensor_msgs
message_runtime
sonia_common
)
#===============================================================================
# I N C L U D E F I L E S
file(GLOB_RECURSE provider_depth_FILES "${provider_depth_SRC_DIR}/*.cc" "${provider_depth_SRC_DIR}/*.h")
include_directories(
${catkin_INCLUDE_DIRS}
${provider_depth_SRC_DIR}
${sonia_common_INCLUDE_DIRS}
)
#==========================================================================
# C R E A T E E X E C U T A B L E
add_executable(${PROJECT_NAME}_node ${provider_depth_FILES})
target_link_libraries(${PROJECT_NAME}_node ${catkin_LIBRARIES} ${sonia_common_LIBRARIES})
add_dependencies(${PROJECT_NAME}_node sonia_common_generate_messages_cpp)
#==========================================================================
# U N I T T E S T S
if (CATKIN_ENABLE_TESTING AND ${CMAKE_CURRENT_SOURCE_DIR}/test)
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/test)
endif ()