-
Notifications
You must be signed in to change notification settings - Fork 28
/
Copy pathdeepin-camera.pro
116 lines (89 loc) · 3.34 KB
/
deepin-camera.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
QT += core gui printsupport svg dbus concurrent dtkwidget multimedia
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
qtHaveModule(opengl): QT += opengl
CONFIG += c++11 link_pkgconfig
TEMPLATE = app
TARGET = deepin-camera
isEmpty(PREFIX){
PREFIX = /usr
}
QMAKE_CFLAGS_ISYSTEM = -I
DEFINES += LIBCHEESE_LIBRARY
#DEFINES +=QT_NO_WARNING_OUTPUT
# 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
DEFINES += DEEPIN_CAMERA_PRO
#SUBDIRS += src
include(src/src/basepub/basepub.pri)
include(libcam/libcam.pri)
include(src/src/qtsingleapplication/qtsingleapplication.pri)
SOURCES += \
$$PWD/src/src/*.cpp \
$$PWD/src/src/*.c \
$$PWD/src/*.cpp \
HEADERS += \
$$PWD/src/src/*.h \
$$PWD/src/*.h
INCLUDEPATH +=/usr/include/libusb-1.0\
/usr/include \
$$PWD/src \
$$PWD/src/src \
$$PWD/libcam/libcam_v4l2core\
$$PWD/libcam/libcam_render\
$$PWD/libcam/libcam_encoder \
$$PWD/libcam/libcam_audio \
$$PWD/libcam/libcam \
$$PWD/src/src/basepub \
$$PWD/src/src/accessibility \
$$PWD/src/src/accessible \
$$PWD/src/src/qtsingleapplication
LIBS += -L/lib/x86_64-linux-gnu\
-ldl
LIBS += -LSYSTEMLIBDIR
RESOURCES += \
$$PWD/src/assets/assets.qrc
isEmpty(BINDIR):BINDIR=/usr/bin
isEmpty(APPDIR):APPDIR=/usr/share/applications
isEmpty(DSRDIR):DSRDIR=/usr/share/deepin-camera
isEmpty(PREFIX){
PREFIX = /usr
}
target.path = $$INSTROOT$$BINDIR
icon_files.path = $$INSTROOT$$PREFIX/share/icons/hicolor/scalable/apps/
icon_files.files = $$PWD/src/assets/deepin-camera.svg
desktop.path = $$INSTROOT$$APPDIR
desktop.files = $$PWD/src/deepin-camera.desktop
manual_dir.files = $$PWD/src/assets/deepin-camera
manual_dir.path=/usr/share/deepin-manual/manual-assets/application/
dbus_service.files = $$PWD/src/com.deepin.Camera.service
dbus_service.path = $$PREFIX/share/dbus-1/services
unix {
target.path = /usr/bin
# INSTALLS += target
}
CONFIG(release, debug|release) {
TRANSLATIONS = $$files($$PWD/src/translations/*.ts)
#遍历目录中的ts文件,调用lrelease将其生成为qm文件
for(tsfile, TRANSLATIONS) {
qmfile = $$replace(tsfile, .ts$, .qm)
system(lrelease $$tsfile -qm $$qmfile) | error("Failed to lrelease")
}
}
translations.path = $$PREFIX/share/deepin-camera/translations
translations.files = $$PWD/src/translations/*.qm
INSTALLS = target desktop dbus_service icon_files translations manual_dir
QMAKE_CXXFLAGS += -Wl,-as-need -fPIE
QMAKE_LFLAGS+=-pie
host_sw_64: {
# 在 sw_64 平台上添加此参数,否则会在旋转图片时崩溃
QMAKE_CFLAGS += -mieee
QMAKE_CXXFLAGS += -mieee
}
host_mips64:{
QMAKE_CXX += -O3 -ftree-vectorize -march=loongson3a -mhard-float -mno-micromips -mno-mips16 -flax-vector-conversions -mloongson-ext2 -mloongson-mmi
QMAKE_CXXFLAGS += -O3 -ftree-vectorize -march=loongson3a -mhard-float -mno-micromips -mno-mips16 -flax-vector-conversions -mloongson-ext2 -mloongson-mmi -Wl,as-need -fPIE
QMAKE_LFLAGS+=-pie
}