2018-07-22 17:07:45 -07:00
|
|
|
QT += core quick network quickcontrols2 svg
|
2018-07-04 14:16:25 -07:00
|
|
|
CONFIG += c++11
|
2018-05-05 17:25:55 -07:00
|
|
|
|
2018-07-22 03:16:33 -07:00
|
|
|
unix:!macx {
|
|
|
|
TARGET = moonlight
|
|
|
|
} else {
|
|
|
|
# On macOS, this is the name displayed in the global menu bar
|
|
|
|
TARGET = Moonlight
|
|
|
|
}
|
|
|
|
|
2018-07-28 17:22:12 -07:00
|
|
|
# Support debug and release builds from command line for CI
|
|
|
|
CONFIG += debug_and_release
|
|
|
|
|
2018-05-05 17:25:55 -07:00
|
|
|
TEMPLATE = app
|
|
|
|
|
|
|
|
# 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
|
|
|
|
|
|
|
|
# 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
|
|
|
|
|
2018-06-23 20:08:17 -07:00
|
|
|
win32 {
|
|
|
|
INCLUDEPATH += $$PWD/../libs/windows/include
|
|
|
|
|
|
|
|
contains(QT_ARCH, i386) {
|
|
|
|
LIBS += -L$$PWD/../libs/windows/lib/x86
|
|
|
|
}
|
|
|
|
contains(QT_ARCH, x86_64) {
|
|
|
|
LIBS += -L$$PWD/../libs/windows/lib/x64
|
|
|
|
}
|
|
|
|
|
2018-08-16 01:29:53 -07:00
|
|
|
LIBS += ws2_32.lib winmm.lib dxva2.lib ole32.lib gdi32.lib user32.lib
|
2018-06-23 20:08:17 -07:00
|
|
|
}
|
2018-05-05 17:25:55 -07:00
|
|
|
macx {
|
2018-07-29 03:38:59 -07:00
|
|
|
INCLUDEPATH += $$PWD/../libs/mac/include $$PWD/../libs/mac/Frameworks/SDL2.framework/Versions/A/Headers
|
|
|
|
LIBS += -L$$PWD/../libs/mac/lib -F$$PWD/../libs/mac/Frameworks
|
2018-05-05 17:25:55 -07:00
|
|
|
}
|
2018-07-07 22:41:32 -07:00
|
|
|
|
2018-05-05 17:25:55 -07:00
|
|
|
unix:!macx {
|
|
|
|
CONFIG += link_pkgconfig
|
2018-07-30 21:48:33 -07:00
|
|
|
PKGCONFIG += openssl sdl2 opus
|
2018-07-21 17:00:09 -07:00
|
|
|
|
|
|
|
packagesExist(libavcodec) {
|
2018-07-21 23:57:39 -07:00
|
|
|
PKGCONFIG += libavcodec libavutil
|
2018-07-21 17:00:09 -07:00
|
|
|
CONFIG += ffmpeg
|
|
|
|
|
|
|
|
packagesExist(libva) {
|
2018-08-11 19:43:36 -07:00
|
|
|
packagesExist(libva-x11) {
|
|
|
|
CONFIG += libva-x11
|
|
|
|
}
|
|
|
|
packagesExist(libva-wayland) {
|
|
|
|
CONFIG += libva-wayland
|
|
|
|
}
|
2018-07-21 17:00:09 -07:00
|
|
|
CONFIG += libva
|
|
|
|
}
|
2018-08-03 02:11:44 -07:00
|
|
|
|
|
|
|
packagesExist(vdpau) {
|
|
|
|
CONFIG += libvdpau
|
|
|
|
}
|
2018-07-21 17:00:09 -07:00
|
|
|
}
|
2018-05-05 17:25:55 -07:00
|
|
|
}
|
2018-06-23 20:08:17 -07:00
|
|
|
win32 {
|
2018-07-30 21:48:33 -07:00
|
|
|
LIBS += -llibssl -llibcrypto -lSDL2 -lavcodec -lavutil -lopus
|
2018-07-21 17:00:09 -07:00
|
|
|
CONFIG += ffmpeg
|
2018-07-07 22:41:32 -07:00
|
|
|
}
|
|
|
|
macx {
|
2018-07-30 21:48:33 -07:00
|
|
|
LIBS += -lssl -lcrypto -lavcodec.58 -lavutil.56 -lopus -framework SDL2
|
2018-07-18 00:10:22 -07:00
|
|
|
LIBS += -lobjc -framework VideoToolbox -framework AVFoundation -framework CoreVideo -framework CoreGraphics -framework CoreMedia -framework AppKit
|
2018-07-21 17:00:09 -07:00
|
|
|
CONFIG += ffmpeg
|
2018-06-23 20:08:17 -07:00
|
|
|
}
|
|
|
|
|
2018-05-05 17:25:55 -07:00
|
|
|
SOURCES += \
|
|
|
|
main.cpp \
|
2018-06-27 22:30:33 -07:00
|
|
|
backend/identitymanager.cpp \
|
|
|
|
backend/nvhttp.cpp \
|
|
|
|
backend/nvpairingmanager.cpp \
|
|
|
|
backend/computermanager.cpp \
|
2018-06-27 23:15:13 -07:00
|
|
|
backend/boxartmanager.cpp \
|
2018-06-28 01:44:43 -07:00
|
|
|
settings/streamingpreferences.cpp \
|
|
|
|
streaming/input.cpp \
|
|
|
|
streaming/session.cpp \
|
|
|
|
streaming/audio.cpp \
|
2018-07-05 20:07:05 -07:00
|
|
|
gui/computermodel.cpp \
|
2018-08-04 22:22:15 -07:00
|
|
|
gui/appmodel.cpp \
|
2018-08-09 22:51:27 -07:00
|
|
|
streaming/streamutils.cpp \
|
2018-08-16 21:04:47 -07:00
|
|
|
backend/autoupdatechecker.cpp \
|
|
|
|
path.cpp
|
2018-05-05 17:25:55 -07:00
|
|
|
|
|
|
|
HEADERS += \
|
|
|
|
utils.h \
|
2018-06-27 22:30:33 -07:00
|
|
|
backend/identitymanager.h \
|
|
|
|
backend/nvhttp.h \
|
|
|
|
backend/nvpairingmanager.h \
|
|
|
|
backend/computermanager.h \
|
2018-06-27 23:15:13 -07:00
|
|
|
backend/boxartmanager.h \
|
2018-06-28 01:44:43 -07:00
|
|
|
settings/streamingpreferences.h \
|
|
|
|
streaming/input.hpp \
|
2018-07-04 16:40:21 -07:00
|
|
|
streaming/session.hpp \
|
2018-07-05 20:07:05 -07:00
|
|
|
gui/computermodel.h \
|
2018-07-13 02:28:10 -07:00
|
|
|
gui/appmodel.h \
|
2018-08-04 22:22:15 -07:00
|
|
|
streaming/video/decoder.h \
|
2018-08-09 22:51:27 -07:00
|
|
|
streaming/streamutils.h \
|
2018-08-16 21:04:47 -07:00
|
|
|
backend/autoupdatechecker.h \
|
|
|
|
path.h
|
2018-07-21 17:00:09 -07:00
|
|
|
|
|
|
|
# Platform-specific renderers and decoders
|
|
|
|
ffmpeg {
|
|
|
|
message(FFmpeg decoder selected)
|
|
|
|
|
|
|
|
DEFINES += HAVE_FFMPEG
|
|
|
|
SOURCES += \
|
|
|
|
streaming/video/ffmpeg.cpp \
|
2018-08-14 19:13:17 -07:00
|
|
|
streaming/video/ffmpeg-renderers/sdl.cpp \
|
2018-08-15 22:02:15 -07:00
|
|
|
streaming/video/ffmpeg-renderers/pacer/pacer.cpp
|
2018-08-14 19:13:17 -07:00
|
|
|
|
2018-07-21 17:00:09 -07:00
|
|
|
HEADERS += \
|
|
|
|
streaming/video/ffmpeg.h \
|
2018-08-14 19:13:17 -07:00
|
|
|
streaming/video/ffmpeg-renderers/renderer.h \
|
2018-08-15 22:02:15 -07:00
|
|
|
streaming/video/ffmpeg-renderers/pacer/pacer.h
|
2018-07-21 17:00:09 -07:00
|
|
|
}
|
|
|
|
libva {
|
|
|
|
message(VAAPI renderer selected)
|
2018-07-13 02:28:10 -07:00
|
|
|
|
2018-08-11 19:43:36 -07:00
|
|
|
PKGCONFIG += libva
|
2018-07-21 17:00:09 -07:00
|
|
|
DEFINES += HAVE_LIBVA
|
|
|
|
SOURCES += streaming/video/ffmpeg-renderers/vaapi.cpp
|
2018-07-21 20:22:00 -07:00
|
|
|
HEADERS += streaming/video/ffmpeg-renderers/vaapi.h
|
|
|
|
}
|
2018-08-11 19:43:36 -07:00
|
|
|
libva-x11 {
|
|
|
|
message(VAAPI X11 support enabled)
|
|
|
|
|
|
|
|
PKGCONFIG += libva-x11
|
|
|
|
DEFINES += HAVE_LIBVA_X11
|
|
|
|
}
|
|
|
|
libva-wayland {
|
|
|
|
message(VAAPI Wayland support enabled)
|
|
|
|
|
|
|
|
PKGCONFIG += libva-wayland
|
|
|
|
DEFINES += HAVE_LIBVA_WAYLAND
|
|
|
|
}
|
2018-08-03 02:11:44 -07:00
|
|
|
libvdpau {
|
|
|
|
message(VDPAU renderer selected)
|
|
|
|
|
|
|
|
DEFINES += HAVE_LIBVDPAU
|
|
|
|
SOURCES += streaming/video/ffmpeg-renderers/vdpau.cpp
|
|
|
|
HEADERS += streaming/video/ffmpeg-renderers/vdpau.h
|
|
|
|
}
|
2018-07-21 20:22:00 -07:00
|
|
|
config_SLVideo {
|
|
|
|
message(SLVideo decoder/renderer selected)
|
|
|
|
|
|
|
|
DEFINES += HAVE_SLVIDEO
|
|
|
|
LIBS += -lSLVideo
|
|
|
|
SOURCES += streaming/video/sl.cpp
|
|
|
|
HEADERS += streaming/video/sl.h
|
2018-07-21 17:00:09 -07:00
|
|
|
}
|
2018-07-13 02:28:10 -07:00
|
|
|
win32 {
|
2018-07-21 17:00:09 -07:00
|
|
|
message(DXVA2 renderer selected)
|
|
|
|
|
2018-08-15 23:20:56 -07:00
|
|
|
SOURCES += \
|
|
|
|
streaming/video/ffmpeg-renderers/dxva2.cpp \
|
|
|
|
streaming/video/ffmpeg-renderers/pacer/dxvsyncsource.cpp
|
|
|
|
|
|
|
|
HEADERS += \
|
|
|
|
streaming/video/ffmpeg-renderers/dxva2.h \
|
|
|
|
streaming/video/ffmpeg-renderers/pacer/dxvsyncsource.h
|
2018-07-13 02:28:10 -07:00
|
|
|
}
|
2018-07-15 11:53:55 -07:00
|
|
|
macx {
|
2018-07-21 17:00:09 -07:00
|
|
|
message(VideoToolbox renderer selected)
|
|
|
|
|
2018-08-15 22:02:15 -07:00
|
|
|
SOURCES += \
|
|
|
|
streaming/video/ffmpeg-renderers/vt.mm \
|
|
|
|
streaming/video/ffmpeg-renderers/pacer/displaylinkvsyncsource.cpp
|
|
|
|
|
|
|
|
HEADERS += \
|
|
|
|
streaming/video/ffmpeg-renderers/vt.h \
|
|
|
|
streaming/video/ffmpeg-renderers/pacer/displaylinkvsyncsource.h
|
2018-07-15 11:53:55 -07:00
|
|
|
}
|
2018-05-05 17:25:55 -07:00
|
|
|
|
|
|
|
RESOURCES += \
|
2018-07-04 14:16:25 -07:00
|
|
|
resources.qrc \
|
|
|
|
qml.qrc
|
|
|
|
|
|
|
|
# Additional import path used to resolve QML modules in Qt Creator's code model
|
|
|
|
QML_IMPORT_PATH =
|
|
|
|
|
|
|
|
# Additional import path used to resolve QML modules just for Qt Quick Designer
|
|
|
|
QML_DESIGNER_IMPORT_PATH =
|
2018-05-05 17:25:55 -07:00
|
|
|
|
|
|
|
win32:CONFIG(release, debug|release): LIBS += -L$$OUT_PWD/../moonlight-common-c/release/ -lmoonlight-common-c
|
|
|
|
else:win32:CONFIG(debug, debug|release): LIBS += -L$$OUT_PWD/../moonlight-common-c/debug/ -lmoonlight-common-c
|
|
|
|
else:unix: LIBS += -L$$OUT_PWD/../moonlight-common-c/ -lmoonlight-common-c
|
|
|
|
|
|
|
|
INCLUDEPATH += $$PWD/../moonlight-common-c/moonlight-common-c/src
|
|
|
|
DEPENDPATH += $$PWD/../moonlight-common-c/moonlight-common-c/src
|
|
|
|
|
2018-06-30 21:41:00 -07:00
|
|
|
win32:CONFIG(release, debug|release): LIBS += -L$$OUT_PWD/../qmdnsengine/release/ -lqmdnsengine
|
|
|
|
else:win32:CONFIG(debug, debug|release): LIBS += -L$$OUT_PWD/../qmdnsengine/debug/ -lqmdnsengine
|
|
|
|
else:unix: LIBS += -L$$OUT_PWD/../qmdnsengine/ -lqmdnsengine
|
|
|
|
|
|
|
|
INCLUDEPATH += $$PWD/../qmdnsengine/qmdnsengine/src/include $$PWD/../qmdnsengine
|
|
|
|
DEPENDPATH += $$PWD/../qmdnsengine/qmdnsengine/src/include $$PWD/../qmdnsengine
|
2018-07-04 14:16:25 -07:00
|
|
|
|
2018-07-21 23:57:39 -07:00
|
|
|
unix:!macx: {
|
|
|
|
isEmpty(PREFIX) {
|
|
|
|
PREFIX = /usr/local
|
|
|
|
}
|
|
|
|
isEmpty(BINDIR) {
|
|
|
|
BINDIR = bin
|
|
|
|
}
|
|
|
|
|
|
|
|
target.path = $$PREFIX/$$BINDIR/
|
|
|
|
|
|
|
|
desktop.files = deploy/linux/com.moonlight_stream.Moonlight.desktop
|
|
|
|
desktop.path = $$PREFIX/share/applications/
|
|
|
|
|
|
|
|
icons.files = res/moonlight.svg
|
|
|
|
icons.path = $$PREFIX/share/icons/hicolor/scalable/apps/
|
|
|
|
|
|
|
|
appdata.files = deploy/linux/com.moonlight_stream.Moonlight.appdata.xml
|
|
|
|
appdata.path = $$PREFIX/share/metainfo/
|
|
|
|
|
|
|
|
INSTALLS += target desktop icons appdata
|
|
|
|
}
|
2018-07-25 02:53:51 -07:00
|
|
|
win32 {
|
|
|
|
RC_ICONS = moonlight.ico
|
|
|
|
}
|
2018-07-08 11:38:01 -07:00
|
|
|
macx {
|
|
|
|
QMAKE_INFO_PLIST = $$PWD/Info.plist
|
2018-07-29 13:05:18 -07:00
|
|
|
|
|
|
|
APP_BUNDLE_RESOURCES.files = moonlight.icns
|
|
|
|
APP_BUNDLE_RESOURCES.path = Contents/Resources
|
|
|
|
QMAKE_BUNDLE_DATA += APP_BUNDLE_RESOURCES
|
2018-07-08 11:38:01 -07:00
|
|
|
}
|
2018-07-25 02:53:51 -07:00
|
|
|
|
2018-08-12 01:42:28 -07:00
|
|
|
VERSION = 0.2.0
|
|
|
|
DEFINES += VERSION_STR=\\\"0.2.0\\\"
|