forked from GSam/Capture2Text
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCapture2Text.pro
156 lines (129 loc) · 3.99 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
# Linux can only compiler the console version
CONFIG += console
QT += core
!console {
QT += gui network texttospeech
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
}
TARGET = Capture2Text
console {
TARGET = Capture2Text_CLI
}
TEMPLATE = app
# 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
# 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_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
}
# Linux Paths
INCLUDEPATH += /usr/include/tesseract/
INCLUDEPATH += /usr/include/leptonica/
# INCLUDEPATH += E:\Dev\cpp\Tess4\tesseract\api
# INCLUDEPATH += E:\Dev\cpp\Tess4\tesseract\ccmain
# INCLUDEPATH += E:\Dev\cpp\Tess4\tesseract\ccstruct
# INCLUDEPATH += E:\Dev\cpp\Tess4\tesseract\ccutil
# INCLUDEPATH += E:\Dev\cpp\Leptonica_1.74.4\src
# Tesseract and Leptonica
bits32 {
# 32-bit
win32:CONFIG(release, debug|release): LIBS += -LE:\Dev\cpp\Leptonica_1.74.4\bin\32\Release \
-LE:\Dev\cpp\Tess4\tesseract\build\Release \
-ltesseract400
else:win32:CONFIG(debug, debug|release): LIBS += -LE:\Dev\cpp\Leptonica_1.74.4\bin\32\Debug \
-LE:\Dev\cpp\Tess4\tesseract\build\Debug \
-ltesseract400d
} else {
# 64-bit
win32:CONFIG(release, debug|release): LIBS += -LE:\Dev\cpp\Leptonica_1.74.4\bin\64\Release \
-LE:\Dev\cpp\Tess4\tesseract\win64\Release \
-ltesseract400
else:win32:CONFIG(debug, debug|release): LIBS += -LE:\Dev\cpp\Leptonica_1.74.4\bin\64\Debug \
-LE:\Dev\cpp\Tess4\tesseract\win64\Debug \
-ltesseract400d
}
# LIBS += -lpvt.cppan.demo.danbloomberg.leptonica-1.74.4
# LIBS += -luser32
LIBS += -ltesseract
LIBS += -llept
!console {
RESOURCES += \
resource.qrc
}
# Needed for the icon
RC_FILE = Capture2Text.rc