forked from GSam/Capture2Text
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Capture2Text.pro
157 lines (132 loc) · 3.36 KB
/
Capture2Text.pro
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
QT += core
!console {
QT += gui network texttospeech
QT += widgets
}
TARGET = Capture2Text
console {
TARGET = Capture2Text_CLI
}
TEMPLATE = app
!win32{
PREFIX = $${PREFIX}
isEmpty( PREFIX ):PREFIX = $$(PREFIX)
isEmpty( PREFIX ):PREFIX = /usr/local
message(Install Prefix is: $$PREFIX)
target.path = $$PREFIX/bin/
INSTALLS += target
}
# The following define makes your compiler emit warnings if you use
# any feature of Qt which as been marked as deprecated (the exact warnings
# depend on your compiler). Please consult the documentation of the
# deprecated API in order to know how to port your code away from it.
DEFINES += QT_DEPRECATED_WARNINGS
win32{
# Disable warning: C4305: 'initializing': truncation from 'double' to 'l_float32'
QMAKE_CXXFLAGS += /wd4305
# Disable warning: C4099: 'ETEXT_DESC': type name first seen using 'class' now seen using 'struct'
QMAKE_CXXFLAGS += /wd4099
QMAKE_CFLAGS_DEBUG += /MD
QMAKE_CXXFLAGS_DEBUG += /MD
DEFINES += __WIN32
}
else{
QMAKE_CXXFLAGS += -std=c++11
}
console {
DEFINES += CLI_BUILD
}
# You can also make your code fail to compile if you use deprecated APIs.
# In order to do so, uncomment the following line.
# You can also select to disable deprecated APIs only up to a certain version of Qt.
#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0
SOURCES += main.cpp\
Furigana.cpp \
BoundingTextRect.cpp \
RunGuard.cpp \
CommandLine.cpp \
UtilsLang.cpp \
UtilsImg.cpp \
PostProcess.cpp \
PreProcess.cpp \
OcrEngine.cpp \
UtilsCommon.cpp
HEADERS += \
Furigana.h \
BoundingTextRect.h \
CommandLine.h \
UtilsLang.h \
UtilsImg.h \
PostProcess.h \
PreProcess.h \
PreProcessCommon.h \
OcrEngine.h \
UtilsCommon.h
!console {
SOURCES += \
MainWindow.cpp \
SettingsDialog.cpp \
Settings.cpp \
PopupDialog.cpp \
Preview.cpp \
SampleBox.cpp \
Translate.cpp \
Hotkey.cpp \
HotkeyWidget.cpp \
CaptureBox.cpp \
AboutDialog.cpp \
WelcomeDialog.cpp \
KeyboardHook.cpp \
MouseHook.cpp \
Speech.cpp
HEADERS += \
MainWindow.h \
RunGuard.h \
SettingsDialog.h \
Preview.h \
Settings.h \
PopupDialog.h \
SampleBox.h \
Translate.h \
Hotkey.h \
HotkeyWidget.h \
CaptureBox.h \
AboutDialog.h \
ReplyTimeout.h \
WelcomeDialog.h \
KeyboardHook.h \
MouseHook.h \
Speech.h
FORMS += \
SettingsDialog.ui \
PopupDialog.ui \
HotkeyWidget.ui \
AboutDialog.ui \
WelcomeDialog.ui
}
mac{
QT_CONFIG -= no-pkg-config
CONFIG += link_pkgconfig
PKGCONFIG += tesseract lept
}
# Linux Paths
unix:!mac{
INCLUDEPATH += /usr/include/tesseract/
INCLUDEPATH += /usr/include/leptonica/
}
win32{
CONFIG += conan_basic_setup
include ( conanbuildinfo.pri)
}
# Tesseract and Leptonica
!win32{
LIBS += -ltesseract
LIBS += -llept
}
!console {
RESOURCES += \
resource.qrc
}
# Needed for the icon
RC_FILE = Capture2Text.rc
include (QHotkey/qhotkey.pri)