-
Notifications
You must be signed in to change notification settings - Fork 0
/
HelloSky.pro
209 lines (154 loc) · 5.84 KB
/
HelloSky.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
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
SK = $$_PRO_FILE_PWD_/../Sky
SK_CORE = $$SK/src/SkCore/src
SK_GUI = $$SK/src/SkGui/src
SK_BACKEND = $$SK/src/SkBackend/src
SK_MEDIA = $$SK/src/SkMedia/src
TARGET = HelloSky
!android:DESTDIR = $$_PRO_FILE_PWD_/bin
contains(QT_MAJOR_VERSION, 4) {
QT += opengl declarative network script xml xmlpatterns svg
} else:contains(QT_MAJOR_VERSION, 5) {
QT += opengl quick network xml xmlpatterns svg
win32:QT += winextras
unix:!macx:!ios:!android:QT += x11extras
android:QT += androidextras
} else {
QT += quick network xml svg core5compat
#----------------------------------------------------------------------------------------------
# NOTE Qt6.3: We need the widgets for QApplication and QFileDialog(s).
win32:QT += widgets
macx:QT += widgets
unix:!android:QT += widgets
}
greaterThan(QT_MAJOR_VERSION, 4) {
unix:!macx:!ios:!android:QT += dbus
}
# C++17
contains(QT_MAJOR_VERSION, 4) {
QMAKE_CXXFLAGS += -std=c++1z
} else {
CONFIG += c++1z
}
DEFINES += QUAZIP_BUILD \
SK_CORE_LIBRARY SK_GUI_LIBRARY SK_BACKEND_LIBRARY SK_MEDIA_LIBRARY
!win32-msvc*:!ios:!android:DEFINES += CAN_COMPILE_SSE2
#DEFINES += SK_SOFTWARE
contains(QT_MAJOR_VERSION, 4) {
CONFIG(release, debug|release) {
win32:DEFINES += SK_WIN_NATIVE
}
} else {
win32:DEFINES += SK_WIN_NATIVE
}
deploy|ios|android {
DEFINES += SK_DEPLOY
RESOURCES = dist/qrc/HelloSky.qrc
}
!win32-msvc*:!ios:!android:QMAKE_CXXFLAGS += -msse
# NOTE: This is required to load frameworks in the lib folder.
ios:QMAKE_LFLAGS += -F$$SK/lib
unix:QMAKE_LFLAGS += "-Wl,-rpath,'\$$ORIGIN'"
include($$SK/src/Sk.pri)
include(src/global/global.pri)
include(src/controllers/controllers.pri)
include(src/kernel/kernel.pri)
include(src/io/io.pri)
include(src/thread/thread.pri)
include(src/network/network.pri)
include(src/image/image.pri)
include(src/graphicsview/graphicsview.pri)
include(src/declarative/declarative.pri)
include(src/media/media.pri)
include(src/vlc/vlc.pri)
include(src/3rdparty/qtsingleapplication/qtsingleapplication.pri)
include(src/3rdparty/zlib/zlib.pri)
include(src/3rdparty/quazip/quazip.pri)
INCLUDEPATH += $$SK/include/SkCore \
$$SK/include/SkGui \
$$SK/include/SkBackend \
$$SK/include/SkMedia \
$$SK/include
unix:contains(QT_MAJOR_VERSION, 4) {
INCLUDEPATH += $$SK/include/$$QTX \
$$SK/include/$$QTX/QtCore \
$$SK/include/$$QTX/QtGui \
$$SK/include/$$QTX/QtDeclarative
}
greaterThan(QT_MAJOR_VERSION, 4) {
INCLUDEPATH += $$SK/include/$$QTX \
$$SK/include/$$QTX/QtCore \
$$SK/include/$$QTX/QtGui \
$$SK/include/$$QTX/QtQml \
$$SK/include/$$QTX/QtQuick
}
unix:!macx:!ios:!android:greaterThan(QT_MAJOR_VERSION, 4) {
INCLUDEPATH += $$SK/include/$$QTX/QtDBus
}
win32:LIBS += -L$$SK/lib -llibvlc
# Windows dependency for ShellExecuteA and PostMessage
win32-msvc*:LIBS += shell32.lib User32.lib
unix:!ios:!android:LIBS += -L$$SK/lib -lvlc
# NOTE iOS: MediaPlayer is required for MP* classes.
ios:LIBS += -framework MobileVLCKit \
-framework MediaPlayer
android:LIBS += -L$$ANDROID_LIB -lvlc \
unix:!macx:!ios:!android:contains(QT_MAJOR_VERSION, 4) {
LIBS += -lX11
}
macx {
PATH=$${DESTDIR}/$${TARGET}.app/Contents/MacOS
QMAKE_POST_LINK = install_name_tool -change @rpath/libvlccore.dylib \
@loader_path/libvlccore.dylib $${DESTDIR}/libvlc.dylib;
QMAKE_POST_LINK += install_name_tool -change @rpath/libvlc.dylib \
@loader_path/libvlc.dylib $$PATH/$${TARGET};
QMAKE_POST_LINK += $${QMAKE_COPY} -r $${DESTDIR}/plugins $$PATH;
QMAKE_POST_LINK += $${QMAKE_COPY} $${DESTDIR}/libvlc.dylib $$PATH;
QMAKE_POST_LINK += $${QMAKE_COPY} $${DESTDIR}/libvlccore.dylib $$PATH;
}
macx:ICON = dist/icon.icns
RC_FILE = dist/HelloSky.rc
OTHER_FILES += 3rdparty.sh \
configure.sh \
build.sh \
deploy.sh \
environment.sh \
README.md \
LICENSE.md \
AUTHORS.md \
.azure-pipelines.yml \
.appveyor.yml \
content/generate.sh \
content/Main.qml \
dist/HelloSky.rc \
dist/script/start.sh \
dist/iOS/Info.plist \
dist/iOS/LaunchScreen.storyboard \
dist/iOS/Images.xcassets/Contents.json \
dist/iOS/Images.xcassets/AppIcon.appiconset/Contents.json \
dist/android/res/values/theme.xml \
dist/android/res/drawable/splash.xml \
dist/android/qt5/AndroidManifest.xml \
dist/android/qt5/build.gradle \
dist/android/qt5/gradle/wrapper/gradle-wrapper.properties \
dist/android/qt6/AndroidManifest.xml \
dist/android/qt6/build.gradle \
dist/android/qt6/gradle/wrapper/gradle-wrapper.properties \
ios {
# NOTE iOS: This is required for MobileVLCKit.
Q_ENABLE_BITCODE.name = ENABLE_BITCODE
Q_ENABLE_BITCODE.value = NO
QMAKE_MAC_XCODE_SETTINGS += Q_ENABLE_BITCODE
QMAKE_INFO_PLIST = $$_PRO_FILE_PWD_/dist/iOS/Info.plist
icons.files=$$_PRO_FILE_PWD_/dist/iOS/Images.xcassets
# NOTE iOS: We need to specify this in Info.plist.
launch.files=$$_PRO_FILE_PWD_/dist/iOS/Launch.storyboard
framework.files = $$SK/lib/MobileVLCKit.framework
framework.path = Frameworks
videos.files = $$_PRO_FILE_PWD_/content/videos
QMAKE_BUNDLE_DATA += icons launch framework videos
} android {
ANDROID_PACKAGE_SOURCE_DIR = $$ANDROID_PACKAGE
DISTFILES += $$ANDROID_PACKAGE/AndroidManifest.xml \
$$ANDROID_PACKAGE/build.gradle \
$$ANDROID_PACKAGE/gradle/wrapper/gradle-wrapper.properties
}