moved away from shared libraries
This commit is contained in:
parent
549edda9b0
commit
1b970ae7f6
4 changed files with 45 additions and 73 deletions
|
@ -1,22 +1,41 @@
|
|||
QT += qml quickcontrols2
|
||||
|
||||
!isEmpty(SCSTWLIBRARIES_LIB):error("ScStwLibraries.pri already included")
|
||||
SCSTWLIBRARIES_LIB = 1
|
||||
|
||||
#DEPENDS
|
||||
CONFIG(release, debug|release): {
|
||||
SCSTWLIBRARIES_LIB_OUTPUT_DIR="$$PWD/build/release"
|
||||
} else {
|
||||
SCSTWLIBRARIES_LIB_OUTPUT_DIR="$$PWD/build/debug"
|
||||
ScStwLibraries_QML {
|
||||
QT += qml quickcontrols2
|
||||
DEFINES += ScStwLibraries_QML
|
||||
}
|
||||
|
||||
unix:LIBS += -L$$SCSTWLIBRARIES_LIB_OUTPUT_DIR -lScStwLibraries
|
||||
|
||||
win32:LIBS += -L$$SCSTWLIBRARIES_LIB_OUTPUT_DIR -lScStwLibraries1
|
||||
|
||||
android {
|
||||
ANDROID_EXTRA_LIBS += $$SCSTWLIBRARIES_LIB_OUTPUT_DIR/libScStwLibraries.so
|
||||
ScStwLibraries_ClientLibs {
|
||||
DEFINES += ScStwLibraries_ClientLibs
|
||||
}
|
||||
|
||||
INCLUDEPATH += "$$PWD"
|
||||
INCLUDEPATH += "$$PWD"/headers
|
||||
INCLUDEPATH += $$PWD/headers $$PWD
|
||||
|
||||
SOURCES += \
|
||||
$$PWD/sources/ScStw.cpp \
|
||||
$$PWD/sources/scstwsoundplayer.cpp \
|
||||
$$PWD/sources/scstwlibraries.cpp \
|
||||
$$PWD/sources/scstwrace.cpp \
|
||||
$$PWD/sources/scstwtimer.cpp
|
||||
|
||||
HEADERS += \
|
||||
$$PWD/headers/ScStw.hpp \
|
||||
$$PWD/headers/ScStwLibraries_global.h \
|
||||
$$PWD/headers/scstwlibraries.h \
|
||||
$$PWD/headers/scstwrace.h \
|
||||
$$PWD/headers/scstwsoundplayer.h \
|
||||
$$PWD/headers/scstwtimer.h
|
||||
|
||||
ScStwLibraries_ClientLibs {
|
||||
SOURCES += \
|
||||
$$PWD/sources/scstwclient.cpp
|
||||
$$PWD/sources/scstwremotemonitorrace.cpp
|
||||
|
||||
HEADERS += \
|
||||
$$PWD/headers/scstwclient.h \
|
||||
$$PWD/headers/scstwremotemonitorrace.h
|
||||
}
|
||||
|
||||
RESOURCES += \
|
||||
$$PWD/resources/ScStwLibrariesShared.qrc
|
||||
|
|
|
@ -1,57 +0,0 @@
|
|||
QT -= gui
|
||||
QT += network multimedia quick
|
||||
|
||||
CONFIG(contains(QMAKE_LFLAGS_CONSOLE)){
|
||||
message("this is console")
|
||||
}
|
||||
|
||||
TEMPLATE = lib
|
||||
DEFINES += SCSTWLIBRARIES_LIBRARY
|
||||
|
||||
CONFIG += c++11
|
||||
|
||||
# The following define makes your compiler emit warnings if you use
|
||||
# any Qt feature that has been marked 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 it uses 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
|
||||
|
||||
SOURCES += \
|
||||
sources/ScStw.cpp \
|
||||
sources/scstwclient.cpp \
|
||||
sources/scstwlibraries.cpp \
|
||||
sources/scstwrace.cpp \
|
||||
sources/scstwremotemonitorrace.cpp \
|
||||
sources/scstwsoundplayer.cpp \
|
||||
sources/scstwtimer.cpp
|
||||
|
||||
HEADERS += \
|
||||
headers/ScStw.hpp \
|
||||
headers/ScStwLibraries_global.h \
|
||||
headers/scstwlibraries.h \
|
||||
headers/scstwrace.h \
|
||||
headers/scstwclient.h \
|
||||
headers/scstwremotemonitorrace.h \
|
||||
headers/scstwsoundplayer.h \
|
||||
headers/scstwtimer.h
|
||||
|
||||
RESOURCES += \
|
||||
resources/ScStwLibrariesShared.qrc
|
||||
|
||||
DISTFILES +=
|
||||
|
||||
#DEPENDS
|
||||
CONFIG(release, debug|release): {
|
||||
DESTDIR="$$PWD/build/release"
|
||||
} else {
|
||||
DESTDIR="$$PWD/build/debug"
|
||||
}
|
||||
|
||||
# Default rules for deployment.
|
||||
target.path = /usr/local/lib
|
||||
!isEmpty(target.path): INSTALLS += target
|
|
@ -20,10 +20,15 @@
|
|||
#define SCSTWLIBRARIES_H
|
||||
|
||||
#include <QObject>
|
||||
#ifdef ScStwLibraries_QML
|
||||
#include <QQmlApplicationEngine>
|
||||
#include "scstwclient.h"
|
||||
#endif
|
||||
#include "scstwtimer.h"
|
||||
#include "scstwrace.h"
|
||||
#ifdef ScStwLibraries_ClientLibs
|
||||
#include "scstwremotemonitorrace.h"
|
||||
#include "scstwclient.h"
|
||||
#endif
|
||||
|
||||
class ScStwLibraries : public QObject
|
||||
{
|
||||
|
|
|
@ -24,11 +24,16 @@ ScStwLibraries::ScStwLibraries(QObject *parent) : QObject(parent)
|
|||
}
|
||||
|
||||
void ScStwLibraries::init() {
|
||||
#ifdef ScStwLibraries_QML
|
||||
qmlRegisterType<ScStw>("de.itsblue.ScStw", 2, 0, "ScStw");
|
||||
qRegisterMetaType<ScStw::BaseStationSetting>("ScStw::BaseStationSetting");
|
||||
qRegisterMetaType<ScStw::SocketCommand>("ScStw::SocketCommand");
|
||||
|
||||
qmlRegisterType<ScStwRace>("de.itsblue.ScStw", 2, 0, "ScStwRace");
|
||||
qmlRegisterType<ScStwTimer>("de.itsblue.ScStw", 2, 0, "ScStwTimer");
|
||||
|
||||
#ifdef ScStwLibraries_ClientLibs
|
||||
qmlRegisterType<ScStwClient>("de.itsblue.ScStw", 2, 0, "ScStwClient");
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
|
|
Reference in a new issue