1
0
mirror of https://gitlab.com/kelteseth/ScreenPlay.git synced 2024-11-22 02:32:29 +01:00

Fix sdk build

This commit is contained in:
Elias 2019-04-04 17:19:05 +02:00
parent 2a77ce9a37
commit dc0d8afa8b
5 changed files with 69 additions and 34 deletions

View File

@ -0,0 +1,7 @@
SOURCES += \
$$PWD/screenplay-sdk_plugin.cpp \
$$PWD/screenplaysdk.cpp
HEADERS += \
$$PWD/screenplay-sdk_plugin.h \
$$PWD/screenplaysdk.h

View File

@ -0,0 +1,35 @@
TEMPLATE = lib
TARGET = ScreenPlaySDK
TARGET = $$qtLibraryTarget($$TARGET)
QT += qml quick
CONFIG += plugin c++11
uri = net.aimber.screenplaysdk
# Input
SOURCES += \
$$PWD/screenplay-sdk_plugin.cpp \
$$PWD/screenplaysdk.cpp
HEADERS += \
$$PWD/screenplay-sdk_plugin.h \
$$PWD/screenplaysdk.h
DISTFILES = qmldir
!equals(_PRO_FILE_PWD_, $$OUT_PWD) {
copy_qmldir.target = $$OUT_PWD/qmldir
copy_qmldir.depends = $$_PRO_FILE_PWD_/qmldir
copy_qmldir.commands = $(COPY_FILE) \"$$replace(copy_qmldir.depends, /, $$QMAKE_DIR_SEP)\" \"$$replace(copy_qmldir.target, /, $$QMAKE_DIR_SEP)\"
QMAKE_EXTRA_TARGETS += copy_qmldir
PRE_TARGETDEPS += $$copy_qmldir.target
}
qmldir.files = qmldir
installPath = $$[QT_INSTALL_QML]/$$replace(uri, \\., /)
qmldir.path = $$installPath
target.path = $$installPath
INSTALLS += target qmldir

View File

@ -49,7 +49,6 @@ ScreenPlaySDK::ScreenPlaySDK(QQuickItem* parent)
connect(&m_socket, &QLocalSocket::readyRead, this, &ScreenPlaySDK::readyRead); connect(&m_socket, &QLocalSocket::readyRead, this, &ScreenPlaySDK::readyRead);
connect(&m_socket, QOverload<QLocalSocket::LocalSocketError>::of(&QLocalSocket::error), this, &ScreenPlaySDK::error); connect(&m_socket, QOverload<QLocalSocket::LocalSocketError>::of(&QLocalSocket::error), this, &ScreenPlaySDK::error);
m_socket.connectToServer(); m_socket.connectToServer();
} }
ScreenPlaySDK::~ScreenPlaySDK() ScreenPlaySDK::~ScreenPlaySDK()
@ -102,6 +101,5 @@ void ScreenPlaySDK::redirectMessage(QByteArray& msg)
if (isConnected()) { if (isConnected()) {
m_socket.write(msg); m_socket.write(msg);
m_socket.waitForBytesWritten(); m_socket.waitForBytesWritten();
} }
} }

View File

@ -13,25 +13,18 @@ HEADERS += \
RESOURCES += \ RESOURCES += \
SPWidgetResources.qrc SPWidgetResources.qrc
INCLUDEPATH += \
$$PWD/../../ThirdParty/ \
$$PWD/../../src/ \
include(../ScreenPlaySDK/ScreenPlaySDK.pri) include(../ScreenPlaySDK/ScreenPlaySDK.pri)
macx: { macx: {
QMAKE_LIBDIR += $$OUT_PWD/ QMAKE_LIBDIR += $$OUT_PWD/
install_it.path = $${OUT_PWD}/../ScreenPlaySDK
} }
!macx: { !macx: {
CONFIG(debug, debug|release) { CONFIG(debug, debug|release) {
LIBS += -lScreenPlaySDK LIBS += -lScreenPlaySDKd
install_it.path = $${OUT_PWD}/debug/
QMAKE_LIBDIR += $$OUT_PWD/../ScreenPlaySDK/debug QMAKE_LIBDIR += $$OUT_PWD/../ScreenPlaySDK/debug
} else { } else {
LIBS += -lScreenplaysdk LIBS += -lScreenPlaySDK
install_it.path = $${OUT_PWD}/release/
QMAKE_LIBDIR += $$OUT_PWD/../ScreenPlaySDK/release QMAKE_LIBDIR += $$OUT_PWD/../ScreenPlaySDK/release
} }
QMAKE_LIBDIR += $$OUT_PWD/../ScreenPlaySDK QMAKE_LIBDIR += $$OUT_PWD/../ScreenPlaySDK

View File

@ -6,6 +6,11 @@ DEFINES += QT_DEPRECATED_WARNINGS
TARGETPATH = ScreenPlayWindow TARGETPATH = ScreenPlayWindow
RESOURCES += \
SPWResources.qrc
SOURCES += \ SOURCES += \
main.cpp \ main.cpp \
src/basewindow.cpp \ src/basewindow.cpp \
@ -14,13 +19,13 @@ HEADERS += \
src/basewindow.h \ src/basewindow.h \
unix{ unix{
SOURCES += \ SOURCES += \
src/linuxwindow.cpp src/linuxwindow.cpp
HEADERS += \
src/linuxwindow.h
HEADERS += \
src/linuxwindow.h
} }
win32 { win32 {
LIBS += -luser32 LIBS += -luser32
SOURCES += \ SOURCES += \
@ -30,19 +35,11 @@ win32 {
HEADERS += \ HEADERS += \
src/windowsdesktopproperties.h \ src/windowsdesktopproperties.h \
src/winwindow.h src/winwindow.h
} }
RESOURCES += \
SPWResources.qrc
INCLUDEPATH += \
$$PWD/../../ThirdParty/ \
$$PWD/../../src/ \
include(../ScreenPlaySDK/ScreenPlaySDK.pri) include(../ScreenPlaySDK/ScreenPlaySDK.pri)
macx: { macx {
QMAKE_LIBDIR += $$OUT_PWD/ QMAKE_LIBDIR += $$OUT_PWD/
install_it.path = $${OUT_PWD}/../ScreenPlaySDK install_it.path = $${OUT_PWD}/../ScreenPlaySDK
@ -55,24 +52,29 @@ macx: {
HEADERS += src/macintegration.h \ HEADERS += src/macintegration.h \
src/macbridge.h src/macbridge.h
OBJECTIVE_SOURCES += src/MacBridge.mm OBJECTIVE_SOURCES += src/MacBridge.mm
SOURCES += \
src/macwindow.cpp
HEADERS += \
src/macwindow.h
} }
!macx: { !macx {
CONFIG(debug, debug|release) { CONFIG(debug, debug|release) {
LIBS += -lScreenPlaySDK LIBS += -lScreenPlaySDKd
install_it.path = $${OUT_PWD}/debug/ install_it.path = $${OUT_PWD}/debug/
QMAKE_LIBDIR += $$OUT_PWD/../ScreenPlaySDK/debug QMAKE_LIBDIR += $$OUT_PWD/../ScreenPlaySDK/debug
} else { } else {
LIBS += -lScreenplaysdk LIBS += -lScreenPlaySDK
install_it.path = $${OUT_PWD}/release/ install_it.path = $${OUT_PWD}/release/
QMAKE_LIBDIR += $$OUT_PWD/../ScreenPlaySDK/release QMAKE_LIBDIR += $$OUT_PWD/../ScreenPlaySDK/release
} }
QMAKE_LIBDIR += $$OUT_PWD/../ScreenPlaySDK QMAKE_LIBDIR += $$OUT_PWD/../ScreenPlaySDK
install_it.files += index.html \
INSTALLS += install_it
DISTFILES += \
index.html
} }
install_it.files += index.html \
INSTALLS += install_it
DISTFILES += \
index.html