-
Notifications
You must be signed in to change notification settings - Fork 122
/
qView.pro
160 lines (128 loc) · 4.77 KB
/
qView.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
158
159
TARGET = qView
VERSION = 6.1
QT += core gui network widgets
TEMPLATE = app
# allows use of version variable elsewhere
DEFINES += "VERSION=$$VERSION"
# build folder organization
DESTDIR = bin
OBJECTS_DIR = build
MOC_DIR = build
UI_DIR = build
RCC_DIR = build
CONFIG -= debug_and_release debug_and_release_target
# enable c++14
CONFIG += c++14
# Print if this is a debug or release build
CONFIG(debug, debug|release) {
message("This is a debug build")
} else {
message("This is a release build")
}
# Check nightly variable
# to use: qmake NIGHTLY=VERSION
!isEmpty(NIGHTLY) {
message("This is nightly $$NIGHTLY")
DEFINES += "NIGHTLY=$$NIGHTLY"
}
# Windows specific stuff
win32 {
QT += svg # needed for including svg support in static build
# To build without win32: qmake CONFIG+=NO_WIN32
!CONFIG(NO_WIN32) {
LIBS += -lshell32 -luser32 -lole32 -lshlwapi -lgdi32
DEFINES += WIN32_LOADED
message("Linked to win32 api")
}
RC_ICONS = "dist/win/qView.ico"
QMAKE_TARGET_COPYRIGHT = "Copyright \\251 2023 jurplel and qView contributors"
QMAKE_TARGET_DESCRIPTION = "qView"
}
# macOS specific stuff
macx {
QT += svg # needed for macdeployqt added qsvg plugin automatically
# To build without cocoa: qmake CONFIG+=NO_COCOA
!CONFIG(NO_COCOA) {
LIBS += -framework Cocoa
DEFINES += COCOA_LOADED
message("Linked to cocoa framework")
}
QMAKE_TARGET_BUNDLE_PREFIX = "com.interversehq"
QMAKE_INFO_PLIST = "dist/mac/Info.plist"
# Older icon for qt 5 on mac
lessThan(QT_MAJOR_VERSION, 6) {
ICON = "dist/mac/qView_legacy.icns"
} else {
ICON = "dist/mac/qView.icns"
}
}
# Linux specific stuff
linux {
!CONFIG(NO_X11) {
LIBS += -lX11
DEFINES += X11_LOADED
equals(QT_MAJOR_VERSION, 5) {
QT += x11extras
}
}
}
# Stuff for make install
# To use a custom prefix: qmake PREFIX=/usr
# An environment variable will also work: PREFIX=/usr qmake
# You can also use at install time: make install INSTALL_ROOT=/usr but this will not override the prefix, just set where it begins
isEmpty(PREFIX) {
PREFIX = $$(PREFIX)
}
isEmpty(PREFIX) {
PREFIX = /usr/local
}
message("Installation prefix is $$PREFIX")
binary.path = $$PREFIX/bin
binary.files = bin/qview
desktop.path = $$PREFIX/share/applications
desktop.files = dist/linux/com.interversehq.qView.desktop
icon16.path = $$PREFIX/share/icons/hicolor/16x16/apps/
icon16.files = dist/linux/hicolor/16x16/apps/com.interversehq.qView.png
icon32.path = $$PREFIX/share/icons/hicolor/32x32/apps/
icon32.files = dist/linux/hicolor/32x32/apps/com.interversehq.qView.png
icon64.path = $$PREFIX/share/icons/hicolor/64x64/apps/
icon64.files = dist/linux/hicolor/64x64/apps/com.interversehq.qView.png
icon128.path = $$PREFIX/share/icons/hicolor/128x128/apps/
icon128.files = dist/linux/hicolor/128x128/apps/com.interversehq.qView.png
icon256.path = $$PREFIX/share/icons/hicolor/256x256/apps/
icon256.files = dist/linux/hicolor/256x256/apps/com.interversehq.qView.png
iconsvg.path = $$PREFIX/share/icons/hicolor/scalable/apps/
iconsvg.files = dist/linux/hicolor/scalable/apps/com.interversehq.qView.svg
iconsym.path = $$PREFIX/share/icons/hicolor/symbolic/apps/
iconsym.files = dist/linux/hicolor/symbolic/apps/com.interversehq.qView-symbolic.svg
license.path = $$PREFIX/share/licenses/qview/
license.files = LICENSE
appstream.path = $$PREFIX/share/metainfo/
appstream.files = dist/linux/com.interversehq.qView.appdata.xml
unix:INSTALLS += binary desktop icon16 icon32 icon64 icon128 icon256 iconsvg iconsym license appstream
unix:!macx:TARGET = qview
# The following define makes your compiler emit warnings if you use
# any feature of Qt which has 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
# 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
# Ban usage of Qt's built in foreach utility for better code style
DEFINES += QT_NO_FOREACH
# To disables both manual and automatic checking for updates either uncomment line below or
# add config flag while building from the command line.
#CONFIG += qv_disable_online_version_check
qv_disable_online_version_check {
DEFINES += QV_DISABLE_ONLINE_VERSION_CHECK
}
include(src/src.pri)
CONFIG += lrelease embed_translations
TRANSLATIONS += $$files(i18n/qview_*.ts)
lupdate_only {
TRANSLATIONS += i18n/template.ts
}
RESOURCES += \
resources/resources.qrc