forked from iEvgeny/cctv-viewer
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcctv-viewer.pro
122 lines (96 loc) · 4.02 KB
/
cctv-viewer.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
VER_MAJ = 0
VER_MIN = 1
VER_PAT = 8
REL_STATUS = "alpha"
VERSION = "$${VER_MAJ}.$${VER_MIN}"
greaterThan(VER_PAT, 0) {
VERSION = "$${VERSION}.$${VER_PAT}"
}
!isEmpty(REL_STATUS) {
VERSION = "$${VERSION}-$${REL_STATUS}"
}
APP_NAME = "CCTV Viewer"
ORG_NAME = "CCTV Viewer"
ORG_DOMAIN = "cctv-viewer.org"
DEFINES += \"APP_NAME=\\\"$${APP_NAME}\\\"\" \
\"APP_VERSION=\\\"$${VERSION}\\\"\" \
\"ORG_NAME=\\\"$${ORG_NAME}\\\"\" \
\"ORG_DOMAIN=\\\"$${ORG_DOMAIN}\\\"\"
# Check Qt version
QT_MIN_MAJOR_VERSION = 5
QT_MIN_MINOR_VERSION = 12
if (lessThan(QT_MAJOR_VERSION, $${QT_MIN_MAJOR_VERSION}) | lessThan(QT_MINOR_VERSION, $${QT_MIN_MINOR_VERSION})) {
error("Cannot build $${APP_NAME} with Qt $${QT_VERSION}. Use at least Qt $${QT_MIN_MAJOR_VERSION}.$${QT_MIN_MINOR_VERSION}.0")
}
QT += qml quick multimedia
CONFIG += c++11 warn_on debug_and_release
# The following define makes your compiler emit warnings if you use
# any Qt feature that has been marked deprecated (the exact warnings
# depend on your compiler). Refer to the documentation for the
# deprecated API to know how to port your code away from it.
DEFINES += QT_DEPRECATED_WARNINGS
# You can also make your code fail to compile if it uses 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
TEMPLATE = app
TARGET = cctv-viewer
DESTDIR = bin
include(src/qmlav/qmlav.pri)
HEADERS += \
src/singleapplication.h \
src/viewportslayoutmodel.h \
src/viewportslayoutscollectionmodel.h
SOURCES += \
src/main.cpp \
src/viewportslayoutmodel.cpp \
src/viewportslayoutscollectionmodel.cpp
RESOURCES += cctv-viewer.qrc
TRANSLATIONS += $$files(translations/*.ts)
OTHER_FILES += \
$$files(src/*.qml) \
3rd/prebuild_ffmpeg.sh
win32:RC_FILE = win32.rc
# Additional import path used to resolve QML modules in Qt Creator's code model
QML_IMPORT_PATH = $$PWD/src/imports
# Additional import path used to resolve QML modules just for Qt Quick Designer
QML_DESIGNER_IMPORT_PATH =
# The following define makes your compiler emit warnings if you use
# any feature of Qt which as been marked 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
LIBS += -lavcodec -lavdevice -lavformat -lavutil -lswresample -lswscale
# Static build for Android
android {
QT += svg
INCLUDEPATH += ./src/qmlav/3rd/FFmpeg
DEPENDPATH += ./src/qmlav/3rd/FFmpeg
for(abi, ANDROID_ABIS) {
LIBS += -L$$PWD/src/qmlav/3rd/FFmpeg/ffbuild/$${abi}/lib
ANDROID_EXTRA_LIBS = \
$$PWD/src/qmlav/3rd/FFmpeg/ffbuild/$${abi}/lib/libavcodec.so \
$$PWD/src/qmlav/3rd/FFmpeg/ffbuild/$${abi}/lib/libavdevice.so \
$$PWD/src/qmlav/3rd/FFmpeg/ffbuild/$${abi}/lib/libavfilter.so \
$$PWD/src/qmlav/3rd/FFmpeg/ffbuild/$${abi}/lib/libavformat.so \
$$PWD/src/qmlav/3rd/FFmpeg/ffbuild/$${abi}/lib/libavutil.so \
$$PWD/src/qmlav/3rd/FFmpeg/ffbuild/$${abi}/lib/libswresample.so \
$$PWD/src/qmlav/3rd/FFmpeg/ffbuild/$${abi}/lib/libswscale.so
}
}
# Rules for deployment.
qnx: target.path = /tmp/$${TARGET}/bin
else: unix:!android: {
target.path = /usr/bin
icon.path = /usr/share/pixmaps
icon.files += images/cctv-viewer.svg
desktop.path = /usr/share/applications
desktop.files += cctv-viewer.desktop
}
!isEmpty(target.path): INSTALLS += target
!isEmpty(icon.path): INSTALLS += icon
!isEmpty(desktop.path): INSTALLS += desktop