-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
143 lines (127 loc) · 3.99 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
cmake_minimum_required(VERSION 3.5)
project(qt_gui_eod VERSION 0.1 LANGUAGES CXX)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
set(CMAKE_AUTOUIC ON)
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
find_package(QT NAMES Qt6 Qt5 COMPONENTS Widgets REQUIRED)
find_package(Qt${QT_VERSION_MAJOR} COMPONENTS Widgets REQUIRED)
find_package(OpenCV REQUIRED)
#find_package(TinyXML REQUIRED)
set(igraph OFF)
set( tinyxml_srcs tinyxml/tinyxml.cpp tinyxml/tinyxmlparser.cpp tinyxml/tinyxmlerror.cpp tinyxml/tinystr.cpp )
set( eod_srcs
lib/ObjectBase.cpp
# types
lib/types/ComplexObjectGraph.cpp
lib/types/ComplexObject.cpp
lib/types/ExtendedObjectInfo.cpp
lib/types/Attribute.cpp
lib/types/SimpleObject.cpp
lib/types/Tracker.cpp
lib/types/Relationship.cpp
lib/types/Filtering.cpp
lib/types/Clusterization.cpp
# lib utils
lib/utils/geometry_utils.cpp
lib/utils/drawing_utils.cpp
lib/utils/contour_utils.cpp
# lib detectors
lib/detectors/HsvColorDetector.cpp
lib/detectors/HaarCascadeDetector.cpp
lib/detectors/SizeDetector.cpp
lib/detectors/HistColorDetector.cpp
lib/detectors/DimentionDetector.cpp
lib/detectors/HoughDetector.cpp
lib/detectors/BasicMotionDetector.cpp
lib/detectors/ArucoDetector.cpp
lib/detectors/PoseDetector.cpp
lib/detectors/TensorFlowDetector.cpp
lib/detectors/FeatureDetector.cpp
lib/detectors/DnnDetector.cpp
lib/detectors/QrDetector.cpp
lib/detectors/QrZbarDetector.cpp
lib/detectors/LogicDetector.cpp
lib/detectors/BlobDetector.cpp
lib/detectors/DepthDetector.cpp
lib/detectors/RoughDistanceDetector.cpp
lib/detectors/DistanceDetector.cpp
lib/detectors/FaceDlibDetector.cpp
lib/detectors/ExtractedInfoIdChecker.cpp
lib/detectors/ExtractedInfoStringChecker.cpp
# lib relations
lib/relations/ImageRangeRelation.cpp
lib/relations/LogicRelations.cpp
lib/relations/ThreeDimRangeRelation.cpp
lib/relations/SpaceRelations.cpp
lib/relations/SizeRelations.cpp
lib/relations/SameExtractedInfoRelation.cpp
)
set(PROJECT_SOURCES
main.cpp
gui_eod.cpp
gui_eod.h
gui_eod.ui
asmOpenCV.h
XML_highlighter.h
XML_highlighter.cpp
${tinyxml_srcs}
${eod_srcs}
)
if(${QT_VERSION_MAJOR} GREATER_EQUAL 6)
qt_add_executable(qt_gui_eod
MANUAL_FINALIZATION
${PROJECT_SOURCES}
)
# Define target properties for Android with Qt 6 as:
# set_property(TARGET qt_gui_eod APPEND PROPERTY QT_ANDROID_PACKAGE_SOURCE_DIR
# ${CMAKE_CURRENT_SOURCE_DIR}/android)
# For more information, see https://doc.qt.io/qt-6/qt-add-executable.html#target-creation
else()
if(ANDROID)
add_library(qt_gui_eod SHARED
${PROJECT_SOURCES}
)
# Define properties for Android with Qt 5 after find_package() calls as:
# set(ANDROID_PACKAGE_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/android")
else()
add_executable(qt_gui_eod
${PROJECT_SOURCES}
)
endif()
endif()
if(igraph)
target_compile_definitions(qt_gui_eod PUBLIC USE_IGRAPH)
set( IGRAPH_INCLUDE_DIRS /usr/local/src/igraph-0.7.1/include/)
set( IGRAPH_LIBRARIES /usr/local/lib/libigraph.so)
endif(igraph)
target_include_directories(
qt_gui_eod
PRIVATE
lib/include
lib/detectors/include
lib/relations/include
lib/utils/include
lib/types/include
tinyxml/
${OpenCV_INCLUDE_DIRS}
#${TinyXML_INCLUDE_DIRS}
${IGRAPH_INCLUDE_DIRS}
)
target_link_libraries(qt_gui_eod
PRIVATE
Qt${QT_VERSION_MAJOR}::Widgets
${OpenCV_LIBRARIES}
#${TinyXML_LIBRARIES}
${IGRAPH_LIBRARIES}
)
set_target_properties(qt_gui_eod PROPERTIES
MACOSX_BUNDLE_GUI_IDENTIFIER my.example.com
MACOSX_BUNDLE_BUNDLE_VERSION ${PROJECT_VERSION}
MACOSX_BUNDLE_SHORT_VERSION_STRING ${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}
)
if(QT_VERSION_MAJOR EQUAL 6)
qt_finalize_executable(qt_gui_eod)
endif()