forked from gottcode/gottet
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgottet.pro
97 lines (79 loc) · 2.03 KB
/
gottet.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
lessThan(QT_MAJOR_VERSION, 5) {
error("Gottet requires Qt 5.2 or greater")
}
equals(QT_MAJOR_VERSION, 5):lessThan(QT_MINOR_VERSION, 2) {
error("Gottet requires Qt 5.2 or greater")
}
TEMPLATE = app
QT += widgets
CONFIG += c++11
CONFIG(debug, debug|release) {
CONFIG += warn_on
DEFINES += QT_DEPRECATED_WARNINGS
DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x051100
DEFINES += QT_NO_NARROWING_CONVERSIONS_IN_CONNECT
}
# Allow in-tree builds
!win32 {
MOC_DIR = build
OBJECTS_DIR = build
RCC_DIR = build
}
# Set program version
VERSION = 1.1.6
DEFINES += VERSIONSTR=\\\"$${VERSION}\\\"
# Set program name
unix: !macx {
TARGET = gottet
} else {
TARGET = Gottet
}
# Specify program sources
HEADERS = src/board.h \
src/locale_dialog.h \
src/piece.h \
src/score_board.h \
src/window.h
SOURCES = src/board.cpp \
src/locale_dialog.cpp \
src/main.cpp \
src/piece.cpp \
src/score_board.cpp \
src/window.cpp
# Generate translations
TRANSLATIONS = $$files(translations/gottet_*.ts)
qtPrepareTool(LRELEASE, lrelease)
updateqm.input = TRANSLATIONS
updateqm.output = ${QMAKE_FILE_PATH}/${QMAKE_FILE_BASE}.qm
updateqm.commands = $$LRELEASE -silent ${QMAKE_FILE_IN} -qm ${QMAKE_FILE_OUT}
updateqm.CONFIG += no_link target_predeps
QMAKE_EXTRA_COMPILERS += updateqm
# Install program data
macx {
ICON = icons/gottet.icns
} else:win32 {
RC_FILE = icons/icon.rc
} else:unix {
RESOURCES = icons/icon.qrc
isEmpty(PREFIX) {
PREFIX = /usr/local
}
isEmpty(BINDIR) {
BINDIR = bin
}
target.path = $$PREFIX/$$BINDIR/
icon.files = icons/hicolor/*
icon.path = $$PREFIX/share/icons/hicolor/
pixmap.files = icons/gottet.xpm
pixmap.path = $$PREFIX/share/pixmaps/
desktop.files = icons/gottet.desktop
desktop.path = $$PREFIX/share/applications/
appdata.files = icons/gottet.appdata.xml
appdata.path = $$PREFIX/share/metainfo/
qm.files = $$replace(TRANSLATIONS, .ts, .qm)
qm.path = $$PREFIX/share/gottet/translations
qm.CONFIG += no_check_exist
man.files = doc/gottet.6
man.path = $$PREFIX/share/man/man6
INSTALLS += target icon pixmap desktop appdata qm man
}