moonlight-qt/app/app.pro

372 lines
11 KiB
Prolog
Raw Normal View History

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
# Ensure symbols are always generated
CONFIG += force_debug_info
# Precompile QML files to avoid writing qmlcache on portable versions.
# Since this binds the app against the Qt runtime version, we will only
# do this for Windows and Mac, since they ship with the Qt runtime.
win32|macx {
CONFIG(release, debug|release) {
CONFIG += qtquickcompiler
}
}
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 \
$$(DXSDK_DIR)/Include
2018-06-23 20:08:17 -07:00
contains(QT_ARCH, i386) {
LIBS += -L$$PWD/../libs/windows/lib/x86
LIBS += -L$$(DXSDK_DIR)/Lib/x86
2018-06-23 20:08:17 -07:00
}
contains(QT_ARCH, x86_64) {
LIBS += -L$$PWD/../libs/windows/lib/x64
LIBS += -L$$(DXSDK_DIR)/Lib/x64
2018-06-23 20:08:17 -07:00
}
LIBS += ws2_32.lib winmm.lib dxva2.lib ole32.lib gdi32.lib user32.lib d3d9.lib dwmapi.lib dbghelp.lib
2018-06-23 20:08:17 -07:00
}
2018-05-05 17:25:55 -07:00
macx {
2019-02-12 21:32:11 -08:00
INCLUDEPATH += $$PWD/../libs/mac/include
INCLUDEPATH += $$PWD/../libs/mac/Frameworks/SDL2.framework/Versions/A/Headers
INCLUDEPATH += $$PWD/../libs/mac/Frameworks/SDL2_ttf.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 {
2019-03-22 23:08:10 -07:00
CONFIG += link_pkgconfig
2019-02-12 21:38:51 -08:00
PKGCONFIG += openssl sdl2 SDL2_ttf opus
2019-03-22 23:08:10 -07:00
# SLAudio is used on Steam Link
!config_SL {
CONFIG += soundio
}
2019-03-22 23:08:10 -07:00
soundio {
packagesExist(libpulse) {
PKGCONFIG += libpulse
}
packagesExist(alsa) {
PKGCONFIG += alsa
}
2018-09-22 17:12:54 -07:00
}
packagesExist(libavcodec) {
2018-07-21 23:57:39 -07:00
PKGCONFIG += libavcodec libavutil
CONFIG += ffmpeg
packagesExist(libva) {
2018-08-11 19:43:36 -07:00
packagesExist(libva-x11) {
CONFIG += libva-x11
}
packagesExist(libva-wayland) {
CONFIG += libva-wayland
}
CONFIG += libva
}
2018-08-03 02:11:44 -07:00
packagesExist(vdpau) {
CONFIG += libvdpau
}
2019-04-16 01:20:21 -07:00
packagesExist(mmal) {
PKGCONFIG += mmal
CONFIG += mmal
}
}
2018-05-05 17:25:55 -07:00
}
2018-06-23 20:08:17 -07:00
win32 {
2019-02-12 21:55:15 -08:00
LIBS += -llibssl -llibcrypto -lSDL2 -lSDL2_ttf -lavcodec -lavutil -lopus -ld3dx9
2019-03-13 01:02:04 -07:00
CONFIG += ffmpeg
}
win32:!winrt {
CONFIG += soundio
2018-07-07 22:41:32 -07:00
}
macx {
2019-02-12 21:32:11 -08:00
LIBS += -lssl -lcrypto -lavcodec.58 -lavutil.56 -lopus -framework SDL2 -framework SDL2_ttf
LIBS += -lobjc -framework VideoToolbox -framework AVFoundation -framework CoreVideo -framework CoreGraphics -framework CoreMedia -framework AppKit
# For libsoundio
LIBS += -framework CoreAudio -framework AudioUnit
CONFIG += ffmpeg soundio
2018-06-23 20:08:17 -07:00
}
2018-05-05 17:25:55 -07:00
SOURCES += \
main.cpp \
backend/computerseeker.cpp \
backend/identitymanager.cpp \
backend/nvcomputer.cpp \
backend/nvhttp.cpp \
backend/nvpairingmanager.cpp \
backend/computermanager.cpp \
2018-06-27 23:15:13 -07:00
backend/boxartmanager.cpp \
cli/commandlineparser.cpp \
cli/quitstream.cpp \
cli/startstream.cpp \
settings/streamingpreferences.cpp \
streaming/input.cpp \
streaming/session.cpp \
streaming/audio/audio.cpp \
streaming/audio/renderers/sdlaud.cpp \
gui/computermodel.cpp \
gui/appmodel.cpp \
streaming/streamutils.cpp \
backend/autoupdatechecker.cpp \
path.cpp \
settings/mappingmanager.cpp \
gui/sdlgamepadkeynavigation.cpp \
streaming/video/overlaymanager.cpp \
backend/systemproperties.cpp
2018-05-05 17:25:55 -07:00
HEADERS += \
utils.h \
backend/computerseeker.h \
backend/identitymanager.h \
backend/nvcomputer.h \
backend/nvhttp.h \
backend/nvpairingmanager.h \
backend/computermanager.h \
2018-06-27 23:15:13 -07:00
backend/boxartmanager.h \
cli/commandlineparser.h \
cli/quitstream.h \
cli/startstream.h \
settings/streamingpreferences.h \
2018-09-29 16:18:46 -07:00
streaming/input.h \
streaming/session.h \
streaming/audio/renderers/renderer.h \
streaming/audio/renderers/sdl.h \
gui/computermodel.h \
2018-07-13 02:28:10 -07:00
gui/appmodel.h \
streaming/video/decoder.h \
streaming/streamutils.h \
backend/autoupdatechecker.h \
path.h \
settings/mappingmanager.h \
gui/sdlgamepadkeynavigation.h \
streaming/video/overlaymanager.h \
backend/systemproperties.h
# Platform-specific renderers and decoders
ffmpeg {
message(FFmpeg decoder selected)
DEFINES += HAVE_FFMPEG
SOURCES += \
streaming/video/ffmpeg.cpp \
streaming/video/ffmpeg-renderers/sdlvid.cpp \
streaming/video/ffmpeg-renderers/pacer/pacer.cpp \
streaming/video/ffmpeg-renderers/pacer/nullthreadedvsyncsource.cpp
HEADERS += \
streaming/video/ffmpeg.h \
streaming/video/ffmpeg-renderers/renderer.h \
2019-02-12 19:58:36 -08:00
streaming/video/ffmpeg-renderers/sdlvid.h \
streaming/video/ffmpeg-renderers/pacer/pacer.h \
streaming/video/ffmpeg-renderers/pacer/nullthreadedvsyncsource.h
}
libva {
message(VAAPI renderer selected)
2018-07-13 02:28:10 -07:00
2018-08-11 19:43:36 -07:00
PKGCONFIG += libva
DEFINES += HAVE_LIBVA
SOURCES += streaming/video/ffmpeg-renderers/vaapi.cpp
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
}
2019-04-16 01:20:21 -07:00
mmal {
message(MMAL renderer selected)
DEFINES += HAVE_MMAL
SOURCES += streaming/video/ffmpeg-renderers/mmal.cpp
HEADERS += streaming/video/ffmpeg-renderers/mmal.h
}
2019-03-22 22:51:08 -07:00
config_SL {
message(Steam Link build configuration selected)
2019-03-22 23:08:10 -07:00
DEFINES += STEAM_LINK HAVE_SLVIDEO HAVE_SLAUDIO
LIBS += -lSLVideo -lSLAudio
2018-09-22 17:12:54 -07:00
2019-03-22 22:51:08 -07:00
SOURCES += \
2019-03-22 23:08:10 -07:00
streaming/video/slvid.cpp \
streaming/audio/renderers/slaud.cpp
2019-03-22 22:51:08 -07:00
HEADERS += \
2019-03-22 23:08:10 -07:00
streaming/video/slvid.h \
streaming/audio/renderers/slaud.h
}
2019-03-13 01:02:04 -07:00
win32:!winrt {
message(DXVA2 renderer selected)
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 {
message(VideoToolbox renderer selected)
SOURCES += \
streaming/video/ffmpeg-renderers/vt.mm \
streaming/video/ffmpeg-renderers/pacer/displaylinkvsyncsource.mm
HEADERS += \
streaming/video/ffmpeg-renderers/vt.h \
streaming/video/ffmpeg-renderers/pacer/displaylinkvsyncsource.h
2018-07-15 11:53:55 -07:00
}
soundio {
message(libsoundio audio renderer selected)
2018-09-22 17:12:54 -07:00
DEFINES += HAVE_SOUNDIO SOUNDIO_STATIC_LIBRARY
SOURCES += streaming/audio/renderers/soundioaudiorenderer.cpp
HEADERS += streaming/audio/renderers/soundioaudiorenderer.h
2018-09-22 17:12:54 -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
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
2019-03-22 23:08:10 -07:00
soundio {
2019-03-13 01:02:04 -07:00
win32:CONFIG(release, debug|release): LIBS += -L$$OUT_PWD/../soundio/release/ -lsoundio
else:win32:CONFIG(debug, debug|release): LIBS += -L$$OUT_PWD/../soundio/debug/ -lsoundio
else:unix: LIBS += -L$$OUT_PWD/../soundio/ -lsoundio
2019-03-13 01:02:04 -07:00
INCLUDEPATH += $$PWD/../soundio/libsoundio
DEPENDPATH += $$PWD/../soundio/libsoundio
}
win32:CONFIG(release, debug|release): LIBS += -L$$OUT_PWD/../h264bitstream/release/ -lh264bitstream
else:win32:CONFIG(debug, debug|release): LIBS += -L$$OUT_PWD/../h264bitstream/debug/ -lh264bitstream
else:unix: LIBS += -L$$OUT_PWD/../h264bitstream/ -lh264bitstream
INCLUDEPATH += $$PWD/../h264bitstream/h264bitstream
DEPENDPATH += $$PWD/../h264bitstream/h264bitstream
2019-03-13 01:02:04 -07:00
!winrt {
win32:CONFIG(release, debug|release): LIBS += -L$$OUT_PWD/../AntiHooking/release/ -lAntiHooking
else:win32:CONFIG(debug, debug|release): LIBS += -L$$OUT_PWD/../AntiHooking/debug/ -lAntiHooking
2019-03-13 01:02:04 -07:00
INCLUDEPATH += $$PWD/../AntiHooking
DEPENDPATH += $$PWD/../AntiHooking
}
2018-07-21 23:57:39 -07:00
unix:!macx: {
isEmpty(PREFIX) {
PREFIX = /usr/local
}
isEmpty(BINDIR) {
BINDIR = bin
}
isEmpty(DATADIR) {
DATADIR = share
}
2018-07-21 23:57:39 -07:00
target.path = $$PREFIX/$$BINDIR/
desktop.files = deploy/linux/com.moonlight_stream.Moonlight.desktop
desktop.path = $$PREFIX/$$DATADIR/applications/
2018-07-21 23:57:39 -07:00
icons.files = res/moonlight.svg
icons.path = $$PREFIX/$$DATADIR/icons/hicolor/scalable/apps/
appstream.files = deploy/linux/com.moonlight_stream.Moonlight.appdata.xml
appstream.path = $$PREFIX/$$DATADIR/metainfo/
2018-07-21 23:57:39 -07:00
2019-03-23 12:20:01 -07:00
INSTALLS += target desktop icons appstream
2018-07-21 23:57:39 -07:00
}
2018-07-25 02:53:51 -07:00
win32 {
RC_ICONS = moonlight.ico
2018-09-05 15:52:50 -07:00
QMAKE_TARGET_COMPANY = Moonlight Game Streaming Project
QMAKE_TARGET_DESCRIPTION = Moonlight Game Streaming Client
QMAKE_TARGET_PRODUCT = Moonlight
2018-08-21 01:07:30 -07:00
CONFIG -= embed_manifest_exe
QMAKE_LFLAGS += /MANIFEST:embed /MANIFESTINPUT:$${PWD}/Moonlight.exe.manifest
2018-07-25 02:53:51 -07:00
}
2018-07-08 11:38:01 -07:00
macx {
2019-01-05 18:53:17 -08:00
# Create Info.plist in object dir with the correct version string
system(cp $$PWD/Info.plist $$OUT_PWD/Info.plist)
system(sed -i -e 's/VERSION/$$cat(version.txt)/g' $$OUT_PWD/Info.plist)
QMAKE_INFO_PLIST = $$OUT_PWD/Info.plist
APP_BUNDLE_RESOURCES.files = moonlight.icns
APP_BUNDLE_RESOURCES.path = Contents/Resources
APP_BUNDLE_FRAMEWORKS.files = $$files(../libs/mac/Frameworks/*.framework, true)
APP_BUNDLE_FRAMEWORKS.path = Contents/Frameworks
QMAKE_BUNDLE_DATA += APP_BUNDLE_RESOURCES APP_BUNDLE_FRAMEWORKS
QMAKE_RPATHDIR += @executable_path/../Frameworks
2018-07-08 11:38:01 -07:00
}
2018-07-25 02:53:51 -07:00
VERSION = "$$cat(version.txt)"
DEFINES += VERSION_STR=\\\"$$cat(version.txt)\\\"