-
Notifications
You must be signed in to change notification settings - Fork 6
/
CMakeLists.txt
79 lines (74 loc) · 2.21 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
##
## Copyright 2011-2017 Centreon
##
## Licensed under the Apache License, Version 2.0 (the "License");
## you may not use this file except in compliance with the License.
## You may obtain a copy of the License at
##
## http://www.apache.org/licenses/LICENSE-2.0
##
## Unless required by applicable law or agreed to in writing, software
## distributed under the License is distributed on an "AS IS" BASIS,
## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
## See the License for the specific language governing permissions and
## limitations under the License.
##
## For more information : contact@centreon.com
##
# Global options.
set(INC_DIR "${PROJECT_SOURCE_DIR}/influxdb/inc")
set(SRC_DIR "${PROJECT_SOURCE_DIR}/influxdb/src")
set(TEST_DIR "${PROJECT_SOURCE_DIR}/influxdb/test")
include_directories("${INC_DIR}")
include_directories("${PROJECT_SOURCE_DIR}/neb/inc")
include_directories("${PROJECT_SOURCE_DIR}/storage/inc")
set(INC_DIR "${INC_DIR}/com/centreon/broker/influxdb")
# INFLUXDB module.
set(INFLUXDB "70-influxdb")
set(INFLUXDB "${INFLUXDB}" PARENT_SCOPE)
add_library("${INFLUXDB}" SHARED
# Sources.
"${SRC_DIR}/column.cc"
"${SRC_DIR}/connector.cc"
"${SRC_DIR}/factory.cc"
"${SRC_DIR}/influxdb12.cc"
"${SRC_DIR}/line_protocol_query.cc"
"${SRC_DIR}/macro_cache.cc"
"${SRC_DIR}/main.cc"
"${SRC_DIR}/stream.cc"
# Headers.
"${INC_DIR}/column.hh"
"${INC_DIR}/connector.hh"
"${INC_DIR}/factory.hh"
"${INC_DIR}/influxdb.hh"
"${INC_DIR}/influxdb12.hh"
"${INC_DIR}/line_protocol_query.hh"
"${INC_DIR}/macro_cache.hh"
"${INC_DIR}/stream.hh"
)
target_link_libraries("${INFLUXDB}" bbdo_storage CONAN_PKG::spdlog)
target_precompile_headers(${INFLUXDB} PRIVATE precomp_inc/precomp.hpp)
set_target_properties("${INFLUXDB}" PROPERTIES PREFIX "")
# Testing.
if (WITH_TESTING)
set(
TESTS_SOURCES
${TESTS_SOURCES}
${TEST_DIR}/column.cc
${TEST_DIR}/factory.cc
${TEST_DIR}/influxdb12.cc
${TEST_DIR}/line_protocol_query.cc
${TEST_DIR}/stream.cc
PARENT_SCOPE
)
set(
TESTS_LIBRARIES
${TESTS_LIBRARIES}
${INFLUXDB}
PARENT_SCOPE
)
endif(WITH_TESTING)
# Install rule.
install(TARGETS "${INFLUXDB}"
LIBRARY DESTINATION "${PREFIX_MODULES}"
)