forked from wang-bin/QtAV
-
Notifications
You must be signed in to change notification settings - Fork 0
/
libQmlAV.pro
62 lines (52 loc) · 1.77 KB
/
libQmlAV.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
TEMPLATE = lib
CONFIG += qt plugin
TARGET = QmlAV
QT += quick qml
CONFIG *= qmlav-buildlib
#var with '_' can not pass to pri?
STATICLINK = 0
PROJECTROOT = $$PWD/..
!include($$PROJECTROOT/src/libQtAV.pri): error("could not find libQtAV.pri")
!include(libQmlAV.pri): error("could not find libQmlAV.pri")
preparePaths($$OUT_PWD/../out)
DESTDIR = $$BUILD_DIR/bin/QtAV
RESOURCES +=
message($$BUILD_DIR)
plugin.files = $$PWD/qmldir
plugin.path = $$BUILD_DIR/bin/QtAV/ #TODO: Qt install dir
plugin.commands = -\$\(COPY_FILE\) $$shell_path($$plugin.files) $$shell_path($$plugin.path)
OTHER_FILES += $$plugin.files
QMAKE_POST_LINK += $$plugin.commands
win32 {
RC_FILE = #$${PROJECTROOT}/res/QtAV.rc
#no depends for rc file by default, even if rc includes a header. Makefile target use '/' as default, so not works iwth win cmd
rc.target = $$clean_path($$RC_FILE) #rc obj depends on clean path target
rc.depends = $$PWD/QtAV/version.h
#why use multiple rule failed? i.e. add a rule without command
isEmpty(QMAKE_SH) {
rc.commands = @copy /B $$system_path($$RC_FILE)+,, #change file time
} else {
rc.commands = @touch $$RC_FILE #change file time
}
QMAKE_EXTRA_TARGETS += rc
}
OTHER_FILES += $$RC_FILE
*msvc* {
#link FFmpeg and portaudio which are built by gcc need /SAFESEH:NO
QMAKE_LFLAGS += /SAFESEH:NO
INCLUDEPATH += $$PROJECTROOT/srccompat/msvc
}
#UINT64_C: C99 math features, need -D__STDC_CONSTANT_MACROS in CXXFLAGS
DEFINES += __STDC_CONSTANT_MACROS
SOURCES += QQuickItemRenderer.cpp \
plugin.cpp \
QmlAVPlayer.cpp
HEADERS += QmlAV/private/QQuickItemRenderer_p.h
SDK_HEADERS += \
QmlAV/Export.h \
QmlAV/QQuickItemRenderer.h \
QmlAV/QmlAVPlayer.h
HEADERS *= \
$$SDK_HEADERS
SDK_INCLUDE_FOLDER = QmlAV
include($$PROJECTROOT/deploy.pri)