-
Notifications
You must be signed in to change notification settings - Fork 4
/
snm.pro
91 lines (77 loc) · 1.98 KB
/
snm.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
TEMPLATE = app
TARGET = snm
INCLUDEPATH += .
QMAKE_CXXFLAGS += -std=c++11
# Qt version check
contains(QT_VERSION, ^5\\..*) {
message("Building for Qt version $${QT_VERSION}.")
QT += widgets xml
} else {
error("Qt5 is required!")
}
QT += widgets
DEFINES += VERSION=\\\"1.1.0\\\"
# Input
HEADERS += \
src/about_dlg.hpp \
src/config.hpp \
src/control_tool_bar.hpp \
src/editor.hpp \
src/editor_view.hpp \
src/main_window.hpp \
src/renderer.hpp \
src/render_preview.hpp \
src/settings.hpp
SOURCES += \
src/about_dlg.cpp \
src/config.cpp \
src/control_tool_bar.cpp \
src/editor.cpp \
src/editor_view.cpp \
src/main.cpp \
src/main_window.cpp \
src/renderer.cpp \
src/render_preview.cpp \
src/settings.cpp
RESOURCES += data/icons/Icons.qrc
RC_FILE = data/icons/Windows.rc
# Install to /opt by calling "OPT=1 qmake" or to wanted prefix
# by e.g. "PREFIX=/usr qmake".
unix {
_OPT = $$(OPT)
_BIN = ""
_DAT = ""
if (!isEmpty(_OPT)) {
message("Installs to /opt")
_BIN = /opt/snm
_DAT = /usr
} else {
# Check if PREFIX environment variable is set.
# If not, then assume /usr.
_PREFIX = $$(PREFIX)
isEmpty(_PREFIX) {
_PREFIX = /usr
}
message("Installs to "$$_PREFIX)
_BIN = $$_PREFIX/bin
_DAT = $$_PREFIX
}
# This is for DEB/RPM packaging
_DESTDIR = $$(DESTDIR)
if (!isEmpty(_DESTDIR)) {
_BIN = $$_DESTDIR/$$_BIN
_DAT = $$_DESTDIR/$$_DAT
}
target.path = $$_BIN
desktop.path = $$_DAT/share/applications
if (!isEmpty(_OPT)) {
desktop.files = data/opt/snm.desktop
} else {
desktop.files = data/snm.desktop
}
icon1.path = $$_DAT/share/icons/hicolor/64x64/apps
icon1.files += data/icons/snm.png
icon2.path = $$_DAT/share/pixmaps
icon2.files += data/icons/snm.png
INSTALLS += target desktop icon1 icon2
}