1
0
mirror of https://gitlab.com/kelteseth/ScreenPlay.git synced 2024-10-06 09:17:07 +02: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, QOverload<QLocalSocket::LocalSocketError>::of(&QLocalSocket::error), this, &ScreenPlaySDK::error);
m_socket.connectToServer();
}
ScreenPlaySDK::~ScreenPlaySDK()
@ -102,6 +101,5 @@ void ScreenPlaySDK::redirectMessage(QByteArray& msg)
if (isConnected()) {
m_socket.write(msg);
m_socket.waitForBytesWritten();
}
}

View File

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

View File

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