|
@@
-1,191
+1,197
|
|
1
|
1
|
cmake_minimum_required(VERSION 3.6)
|
|
2
|
2
|
project(SciQLOPCore CXX)
|
|
3
|
3
|
|
|
4
|
4
|
OPTION (CPPCHECK "Analyzes the source code with cppcheck" OFF)
|
|
5
|
5
|
OPTION (CLANG_TIDY "Analyzes the source code with Clang Tidy" OFF)
|
|
6
|
6
|
OPTION (IWYU "Analyzes the source code with Include What You Use" OFF)
|
|
7
|
7
|
|
|
8
|
8
|
OPTION (Catalog "builds catalog API" ON)
|
|
9
|
9
|
|
|
10
|
10
|
set(CMAKE_CXX_STANDARD 17)
|
|
11
|
11
|
|
|
12
|
12
|
set(CMAKE_AUTOMOC ON)
|
|
13
|
13
|
#https://gitlab.kitware.com/cmake/cmake/issues/15227
|
|
14
|
14
|
#set(CMAKE_AUTOUIC ON)
|
|
15
|
15
|
if(POLICY CMP0071)
|
|
16
|
16
|
cmake_policy(SET CMP0071 OLD)
|
|
17
|
17
|
endif()
|
|
18
|
18
|
set(CMAKE_AUTORCC ON)
|
|
19
|
19
|
set(CMAKE_INCLUDE_CURRENT_DIR ON)
|
|
20
|
20
|
|
|
21
|
21
|
find_package(Qt5 COMPONENTS Core Widgets Network PrintSupport Svg Test REQUIRED)
|
|
22
|
22
|
|
|
23
|
23
|
find_package(pybind11 CONFIG QUIET)
|
|
24
|
24
|
if (NOT pybind11_FOUND)
|
|
25
|
|
execute_process(COMMAND git submodule init external/pybind11 WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
|
|
26
|
|
execute_process(COMMAND git submodule update external/pybind11 WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
|
|
|
25
|
if(NOT IS_DIRECTORY ${CMAKE_CURRENT_LIST_DIR}/external/pybind11)
|
|
|
26
|
message("Init submodule pybind11")
|
|
|
27
|
execute_process(COMMAND git submodule init external/pybind11 WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
|
|
|
28
|
execute_process(COMMAND git submodule update external/pybind11 WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
|
|
|
29
|
endif()
|
|
27
|
30
|
add_subdirectory(external/pybind11)
|
|
28
|
31
|
endif()
|
|
29
|
32
|
|
|
30
|
33
|
find_package(libcatalogs CONFIG QUIET)
|
|
31
|
34
|
if (NOT catalogs_FOUND)
|
|
32
|
|
execute_process(COMMAND git submodule init external/libcatalogs WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
|
|
33
|
|
execute_process(COMMAND git submodule update external/libcatalogs WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
|
|
|
35
|
if(NOT IS_DIRECTORY ${CMAKE_CURRENT_LIST_DIR}/external/libcatalogs)
|
|
|
36
|
message("Init submodule libcatalogs")
|
|
|
37
|
execute_process(COMMAND git submodule init external/libcatalogs WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
|
|
|
38
|
execute_process(COMMAND git submodule update external/libcatalogs WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
|
|
|
39
|
endif()
|
|
34
|
40
|
add_subdirectory(external/libcatalogs)
|
|
35
|
41
|
endif()
|
|
36
|
42
|
|
|
37
|
43
|
macro(declare_test testname testexe sources libraries)
|
|
38
|
44
|
add_executable(${testexe} ${sources})
|
|
39
|
45
|
target_link_libraries(${testexe} ${libraries})
|
|
40
|
46
|
add_test(NAME ${testname} COMMAND ${testexe})
|
|
41
|
47
|
endmacro(declare_test)
|
|
42
|
48
|
|
|
43
|
49
|
enable_testing()
|
|
44
|
50
|
|
|
45
|
51
|
FILE (GLOB_RECURSE core_SRCS
|
|
46
|
52
|
./include/DataSource/DataSourceItemMergeHelper.h
|
|
47
|
53
|
./include/DataSource/DataSourceItemAction.h
|
|
48
|
54
|
./include/DataSource/DataSourceItem.h
|
|
49
|
55
|
./include/DataSource/DataSourceController.h
|
|
50
|
56
|
./include/Common/SortUtils.h
|
|
51
|
57
|
./include/Common/spimpl.h
|
|
52
|
58
|
./include/Common/MimeTypesDef.h
|
|
53
|
59
|
./include/Common/MetaTypes.h
|
|
54
|
60
|
./include/Common/StringUtils.h
|
|
55
|
61
|
./include/Common/SignalWaiter.h
|
|
56
|
62
|
./include/Common/DateUtils.h
|
|
57
|
63
|
./include/Common/Numeric.h
|
|
58
|
64
|
./include/Common/deprecate.h
|
|
59
|
65
|
./include/Common/containers.h
|
|
60
|
66
|
./include/Common/debug.h
|
|
61
|
67
|
./include/Plugin/IPlugin.h
|
|
62
|
68
|
./include/Data/ArrayDataIterator.h
|
|
63
|
69
|
./include/Data/VariableRequest.h
|
|
64
|
70
|
./include/Data/VectorSeries.h
|
|
65
|
71
|
./include/Data/DateTimeRange.h
|
|
66
|
72
|
./include/Data/DateTimeRangeHelper.h
|
|
67
|
73
|
./include/Data/ScalarSeries.h
|
|
68
|
74
|
./include/Data/DataSeriesMergeHelper.h
|
|
69
|
75
|
./include/Data/DataSeries.h
|
|
70
|
|
./include/Data/AcquisitionDataPacket.h
|
|
|
76
|
#./include/Data/AcquisitionDataPacket.h
|
|
71
|
77
|
./include/Data/DataSeriesType.h
|
|
72
|
|
./include/Data/AcquisitionRequest.h
|
|
|
78
|
#./include/Data/AcquisitionRequest.h
|
|
73
|
79
|
./include/Data/SqpIterator.h
|
|
74
|
80
|
./include/Data/ArrayData.h
|
|
75
|
81
|
./include/Data/DataSeriesIterator.h
|
|
76
|
82
|
./include/Data/DataSeriesUtils.h
|
|
77
|
83
|
./include/Data/SpectrogramSeries.h
|
|
78
|
84
|
./include/Data/Unit.h
|
|
79
|
85
|
./include/Data/DataProviderParameters.h
|
|
80
|
86
|
./include/Data/OptionalAxis.h
|
|
81
|
87
|
./include/Data/IDataProvider.h
|
|
82
|
88
|
./include/Data/IDataSeries.h
|
|
83
|
89
|
./include/Network/NetworkController.h
|
|
84
|
90
|
./include/Network/Downloader.h
|
|
85
|
91
|
./include/Version.h
|
|
86
|
92
|
./include/CoreGlobal.h
|
|
87
|
93
|
./include/Visualization/VisualizationController.h
|
|
88
|
94
|
./include/PluginManager/PluginManager.h
|
|
89
|
95
|
./include/Variable/VariableModel2.h
|
|
90
|
96
|
./include/Variable/VariableCacheStrategy.h
|
|
91
|
97
|
./include/Variable/VariableSynchronizationGroup2.h
|
|
92
|
98
|
./include/Variable/ProportionalCacheStrategy.h
|
|
93
|
99
|
./include/Variable/SingleThresholdCacheStrategy.h
|
|
94
|
100
|
./include/Variable/VariableCacheStrategyFactory.h
|
|
95
|
101
|
./include/Variable/Variable.h
|
|
96
|
102
|
./include/Variable/VariableController2.h
|
|
97
|
103
|
./include/Variable/private/VCTransaction.h
|
|
98
|
104
|
./include/Time/TimeController.h
|
|
99
|
105
|
./include/Settings/ISqpSettingsBindable.h
|
|
100
|
106
|
./include/Settings/SqpSettingsDefs.h
|
|
101
|
107
|
|
|
102
|
108
|
./src/DataSource/DataSourceItem.cpp
|
|
103
|
109
|
./src/DataSource/DataSourceItemAction.cpp
|
|
104
|
110
|
./src/DataSource/DataSourceItemMergeHelper.cpp
|
|
105
|
111
|
./src/DataSource/DataSourceController.cpp
|
|
106
|
112
|
./src/Common/DateUtils.cpp
|
|
107
|
113
|
./src/Common/MimeTypesDef.cpp
|
|
108
|
114
|
./src/Common/StringUtils.cpp
|
|
109
|
115
|
./src/Common/SignalWaiter.cpp
|
|
110
|
116
|
./src/Data/ScalarSeries.cpp
|
|
111
|
117
|
./src/Data/DataSeriesIterator.cpp
|
|
112
|
118
|
./src/Data/OptionalAxis.cpp
|
|
113
|
119
|
./src/Data/ArrayDataIterator.cpp
|
|
114
|
120
|
./src/Data/SpectrogramSeries.cpp
|
|
115
|
121
|
./src/Data/DataSeriesUtils.cpp
|
|
116
|
122
|
./src/Data/VectorSeries.cpp
|
|
117
|
123
|
./src/Network/NetworkController.cpp
|
|
118
|
124
|
./src/Network/Downloader.cpp
|
|
119
|
125
|
./src/Visualization/VisualizationController.cpp
|
|
120
|
126
|
./src/PluginManager/PluginManager.cpp
|
|
121
|
127
|
./src/Variable/VariableController2.cpp
|
|
122
|
128
|
./src/Variable/VariableModel2.cpp
|
|
123
|
129
|
./src/Variable/VariableSynchronizationGroup2.cpp
|
|
124
|
130
|
./src/Variable/Variable.cpp
|
|
125
|
131
|
./src/Version.cpp
|
|
126
|
132
|
./src/Time/TimeController.cpp
|
|
127
|
133
|
./src/Settings/SqpSettingsDefs.cpp
|
|
128
|
134
|
|
|
129
|
135
|
)
|
|
130
|
136
|
|
|
131
|
137
|
|
|
132
|
138
|
IF(Catalog)
|
|
133
|
139
|
FILE (GLOB_RECURSE core_catalog_SRCS
|
|
134
|
140
|
./src/Catalogue/CatalogueController.cpp
|
|
135
|
141
|
./include/Catalogue/CatalogueController.h
|
|
136
|
142
|
)
|
|
137
|
143
|
ELSE()
|
|
138
|
144
|
FILE (GLOB_RECURSE core_catalog_SRCS
|
|
139
|
145
|
)
|
|
140
|
146
|
ENDIF(Catalog)
|
|
141
|
147
|
|
|
142
|
148
|
add_definitions(-DCORE_STATIC)
|
|
143
|
149
|
#add_definitions(-DHIDE_DEPRECATED)
|
|
144
|
150
|
add_definitions(-DSCIQLOP_CRASH_ON_ERROR)
|
|
145
|
151
|
|
|
146
|
152
|
add_library(sciqlopcore ${core_SRCS} ${core_catalog_SRCS})
|
|
147
|
153
|
SET_TARGET_PROPERTIES(sciqlopcore PROPERTIES WINDOWS_EXPORT_ALL_SYMBOLS TRUE)
|
|
148
|
154
|
|
|
149
|
155
|
target_include_directories(sciqlopcore PUBLIC
|
|
150
|
156
|
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
|
|
151
|
157
|
$<INSTALL_INTERFACE:include/SciQLOP>
|
|
152
|
158
|
)
|
|
153
|
159
|
|
|
154
|
160
|
target_link_libraries(sciqlopcore PUBLIC
|
|
155
|
161
|
Qt5::Core
|
|
156
|
162
|
Qt5::Network
|
|
157
|
163
|
)
|
|
158
|
164
|
|
|
159
|
165
|
if(Catalog)
|
|
160
|
166
|
target_link_libraries(sciqlopcore PUBLIC
|
|
161
|
167
|
catalogs
|
|
162
|
168
|
)
|
|
163
|
169
|
endif()
|
|
164
|
170
|
|
|
165
|
171
|
|
|
166
|
172
|
pybind11_add_module(sciqlopqt src/pybind11_wrappers/QtWrappers.cpp)
|
|
167
|
173
|
target_link_libraries(sciqlopqt PUBLIC Qt5::Core)
|
|
168
|
174
|
|
|
169
|
175
|
pybind11_add_module(pysciqlopcore src/pybind11_wrappers/CoreWrappers.cpp)
|
|
170
|
176
|
target_link_libraries(pysciqlopcore PUBLIC sciqlopcore)
|
|
171
|
177
|
|
|
172
|
178
|
add_library(pysciqlop src/pybind11_wrappers/pywrappers_common.h)
|
|
173
|
179
|
target_link_libraries(pysciqlop PUBLIC Qt5::Core)
|
|
174
|
180
|
target_include_directories(pysciqlop PUBLIC
|
|
175
|
181
|
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/src/pybind11_wrappers/>
|
|
176
|
182
|
$<INSTALL_INTERFACE:include/SciQLOP/py_wrappers>
|
|
177
|
183
|
)
|
|
178
|
184
|
|
|
179
|
185
|
SET_PROPERTY(GLOBAL PROPERTY CORE_PYTHON_PATH ${CMAKE_CURRENT_BINARY_DIR})
|
|
180
|
186
|
|
|
181
|
187
|
|
|
182
|
188
|
install(TARGETS sciqlopcore EXPORT SciQLOPCoreConfig
|
|
183
|
189
|
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
|
184
|
190
|
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
|
185
|
191
|
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
|
|
186
|
192
|
|
|
187
|
193
|
install(DIRECTORY include/ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/SciQLOP)
|
|
188
|
194
|
install(EXPORT SciQLOPCoreConfig DESTINATION share/SciQLOPCore/cmake)
|
|
189
|
195
|
export(TARGETS sciqlopcore FILE SciQLOPCoreConfig.cmake)
|
|
190
|
196
|
|
|
191
|
197
|
add_subdirectory(tests)
|