-
Notifications
You must be signed in to change notification settings - Fork 12
/
CMakeLists.txt
190 lines (178 loc) · 9.28 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
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
cmake_minimum_required(VERSION 3.16)
project(cvcomposer VERSION 1.0 LANGUAGES CXX)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
set(CMAKE_AUTOUIC ON)
find_package(QT NAMES Qt6 REQUIRED COMPONENTS Core)
find_package(Qt${QT_VERSION_MAJOR} REQUIRED COMPONENTS Gui Widgets Xml)
if(DEFINED ENV{GITHUB_ACTIONS} AND DEFINED ENV{GITHUB_WORKSPACE})
set(ARTIFACTS_DIR "$ENV{GITHUB_WORKSPACE}/artifacts")
if(CMAKE_SYSTEM_NAME MATCHES "Windows")
set(OpenCV_DIR "${ARTIFACTS_DIR}/opencv/$ENV{opencv_tag}/windows-x64/x64/vc17/lib/")
elseif(CMAKE_SYSTEM_NAME MATCHES "Linux")
set(OpenCV_DIR "${ARTIFACTS_DIR}/opencv/$ENV{opencv_tag}/linux-x64/lib/cmake/opencv4")
elseif(CMAKE_SYSTEM_NAME MATCHES "Darwin")
set(OpenCV_DIR "${ARTIFACTS_DIR}/opencv/$ENV{opencv_tag}/mac-x64/lib/cmake/opencv4")
endif()
find_package(OpenCV REQUIRED)
endif()
find_package(OpenCV REQUIRED)
qt_standard_project_setup()
qt_add_executable(cvcomposer WIN32
execution/composerexecutor.cpp execution/composerexecutor.h
execution/composerscheduler.cpp execution/composerscheduler.h
execution/executorsettings.h
global/cvconstants.h
global/cvutils.cpp global/cvutils.h
global/parser.cpp global/parser.h
global/properties.cpp global/properties.h
global/threestatebool.h
global/utils.h
gui/advancedimageviewer.cpp gui/advancedimageviewer.h
gui/command/commandid.h
gui/command/createnodecommand.cpp gui/command/createnodecommand.h
gui/command/editconnectioncommand.cpp gui/command/editconnectioncommand.h
gui/command/editvaluecommand.cpp gui/command/editvaluecommand.h
gui/command/movenodecommand.cpp gui/command/movenodecommand.h
gui/command/removenodecommand.cpp gui/command/removenodecommand.h
gui/composerscene.cpp gui/composerscene.h
gui/composerwidget.cpp gui/composerwidget.h
gui/connectionitem.cpp gui/connectionitem.h
gui/customitems.h
gui/editsettingsdialog.cpp gui/editsettingsdialog.h gui/editsettingsdialog.ui
gui/errordisplaydialog.cpp gui/errordisplaydialog.h gui/errordisplaydialog.ui
gui/genericnodeitem.cpp gui/genericnodeitem.h
gui/genericnodewidget.cpp gui/genericnodewidget.h
gui/interactivegraphicsview.cpp gui/interactivegraphicsview.h
gui/mainwidget.cpp gui/mainwidget.h gui/mainwidget.ui
gui/plugitem.cpp gui/plugitem.h
gui/plugtypeshelpdialog.cpp gui/plugtypeshelpdialog.h gui/plugtypeshelpdialog.ui
gui/processorsitemmodel.cpp gui/processorsitemmodel.h
gui/processorsmodelfilter.cpp gui/processorsmodelfilter.h
main.cpp
model/circle.h
model/composermodel.cpp model/composermodel.h
model/connection.cpp model/connection.h
model/contour.h
model/ellipse.h
model/line.h
model/node.cpp model/node.h
model/plug.cpp model/plug.h
model/plugdefinition.h
model/plugtype.cpp model/plugtype.h
model/segment.h
model/triangle.h
plugwidget/abstractplugwidget.cpp plugwidget/abstractplugwidget.h
plugwidget/booleanwidget.cpp plugwidget/booleanwidget.h
plugwidget/colorwidget.cpp plugwidget/colorwidget.h
plugwidget/dataviewerwidget.cpp plugwidget/dataviewerwidget.h
plugwidget/doubleitemdelegate.cpp plugwidget/doubleitemdelegate.h
plugwidget/doublewidget.cpp plugwidget/doublewidget.h
plugwidget/enumerationwidget.cpp plugwidget/enumerationwidget.h
plugwidget/imageviewerdockwidget.cpp plugwidget/imageviewerdockwidget.h plugwidget/imageviewerdockwidget.ui
plugwidget/imageviewerwidget.cpp plugwidget/imageviewerwidget.h
plugwidget/kerneldefinitionwidget.cpp plugwidget/kerneldefinitionwidget.h
plugwidget/pathwidget.cpp plugwidget/pathwidget.h
plugwidget/pointwidget.cpp plugwidget/pointwidget.h
plugwidget/sizewidget.cpp plugwidget/sizewidget.h
plugwidget/stringwidget.cpp plugwidget/stringwidget.h
processor/abstractprocessor.cpp processor/abstractprocessor.h
processor/analyzer/discretefouriertransformprocessor.cpp processor/analyzer/discretefouriertransformprocessor.h
processor/analyzer/findcontoursprocessor.cpp processor/analyzer/findcontoursprocessor.h
processor/analyzer/haarcascadeprocessor.cpp processor/analyzer/haarcascadeprocessor.h
processor/analyzer/mixtureofgaussian2processor.cpp processor/analyzer/mixtureofgaussian2processor.h
processor/data/applycolormapprocessor.cpp processor/data/applycolormapprocessor.h
processor/data/countlistprocessor.cpp processor/data/countlistprocessor.h
processor/data/kernelprocessor.cpp processor/data/kernelprocessor.h
processor/data/splitchannelsprocessor.cpp processor/data/splitchannelsprocessor.h
processor/data/sublistprocessor.cpp processor/data/sublistprocessor.h
processor/filter/absolutedifferenceprocessor.cpp processor/filter/absolutedifferenceprocessor.h
processor/filter/adaptativethresholdprocessor.cpp processor/filter/adaptativethresholdprocessor.h
processor/filter/addweightedprocessor.cpp processor/filter/addweightedprocessor.h
processor/filter/applyroiprocessor.cpp processor/filter/applyroiprocessor.h
processor/filter/bilateralfilterprocessor.cpp processor/filter/bilateralfilterprocessor.h
processor/filter/blurprocessor.cpp processor/filter/blurprocessor.h
processor/filter/cannyprocessor.cpp processor/filter/cannyprocessor.h
processor/filter/convertcolorprocessor.cpp processor/filter/convertcolorprocessor.h
processor/filter/converttoprocessor.cpp processor/filter/converttoprocessor.h
processor/filter/customfilterprocessor.cpp processor/filter/customfilterprocessor.h
processor/filter/floodfillprocessor.cpp processor/filter/floodfillprocessor.h
processor/filter/gaussianblurprocessor.cpp processor/filter/gaussianblurprocessor.h
processor/filter/inrangeprocessor.cpp processor/filter/inrangeprocessor.h
processor/filter/laplacianprocessor.cpp processor/filter/laplacianprocessor.h
processor/filter/medianblurprocessor.cpp processor/filter/medianblurprocessor.h
processor/filter/morphologytransformationprocessor.cpp processor/filter/morphologytransformationprocessor.h
processor/filter/sobelprocessor.cpp processor/filter/sobelprocessor.h
processor/filter/thresholdprocessor.cpp processor/filter/thresholdprocessor.h
processor/geometry/makeborderprocessor.cpp processor/geometry/makeborderprocessor.h
processor/geometry/pyramidprocessor.cpp processor/geometry/pyramidprocessor.h
processor/geometry/subimageprocessor.cpp processor/geometry/subimageprocessor.h
processor/helpmessage.h
processor/helpmessagetype.h
processor/input/cameraprocessor.cpp processor/input/cameraprocessor.h
processor/input/imagefromfileprocessor.cpp processor/input/imagefromfileprocessor.h
processor/input/imagesfromfolderprocessor.cpp processor/input/imagesfromfolderprocessor.h
processor/math/averageprocessor.cpp processor/math/averageprocessor.h
processor/math/countnonzeroprocessor.cpp processor/math/countnonzeroprocessor.h
processor/math/meanprocessor.cpp processor/math/meanprocessor.h
processor/math/operatorprocessor.cpp processor/math/operatorprocessor.h
processor/processorlisttype.h
processor/processorsfactory.cpp processor/processorsfactory.h
processor/shape/boundingrectprocessor.cpp processor/shape/boundingrectprocessor.h
processor/shape/circleprocessor.cpp processor/shape/circleprocessor.h
processor/shape/convexhullprocessor.cpp processor/shape/convexhullprocessor.h
processor/shape/drawshapeprocessor.cpp processor/shape/drawshapeprocessor.h
processor/shape/drawtextprocessor.cpp processor/shape/drawtextprocessor.h
processor/shape/ellipseprocessor.cpp processor/shape/ellipseprocessor.h
processor/shape/fitellipseprocessor.cpp processor/shape/fitellipseprocessor.h
processor/shape/fitlineprocessor.cpp processor/shape/fitlineprocessor.h
processor/shape/houghcircleprocessor.cpp processor/shape/houghcircleprocessor.h
processor/shape/houghlineprobaprocessor.cpp processor/shape/houghlineprobaprocessor.h
processor/shape/houghlineprocessor.cpp processor/shape/houghlineprocessor.h
processor/shape/lineprocessor.cpp processor/shape/lineprocessor.h
processor/shape/minenclosingtriangleprocessor.cpp processor/shape/minenclosingtriangleprocessor.h
processor/shape/rectangleprocessor.cpp processor/shape/rectangleprocessor.h
processor/viewer/dataviewerprocessor.cpp processor/viewer/dataviewerprocessor.h
processor/viewer/imageviewerprocessor.cpp processor/viewer/imageviewerprocessor.h
)
include_directories(${OpenCV_INCLUDE_DIRS})
target_link_libraries(cvcomposer PRIVATE
Qt::Core
Qt::Gui
Qt::Widgets
Qt::Xml
${OpenCV_LIBS}
)
if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
target_compile_options(cvcomposer PRIVATE
-Werror=return-type
-Werror=shadow
-Wno-deprecated-enum-enum-conversion
-Wsuggest-override
-std=c++2a
)
endif()
# Resources:
set(resources_resource_files
"resources/Ubuntu-R.ttf"
"resources/book.svg"
"resources/brackets.svg"
"resources/class.svg"
"resources/credits.html"
"resources/licence.html"
)
qt_add_resources(cvcomposer "resources"
PREFIX
"/"
FILES
${resources_resource_files}
)
install(TARGETS cvcomposer
BUNDLE DESTINATION .
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
)
qt_generate_deploy_app_script(
TARGET cvcomposer
FILENAME_VARIABLE deploy_script
NO_UNSUPPORTED_PLATFORM_ERROR
)
install(SCRIPT ${deploy_script})