update for windows builds

This commit is contained in:
Justin Hammond 2019-10-14 16:56:40 +08:00
parent 157363775d
commit 05c28412b8
3 changed files with 33 additions and 13 deletions

View file

@ -36,24 +36,36 @@ unix {
}
win32 {
CONFIG(debug,debug|release) BUILDTYPE = debug
CONFIG(release,debug|release) BUILDTYPE = release
CONFIG(debug, debug|release) {
BUILDTYPE = debug
} else {
BUILDTYPE = release
}
message(Checking for $$BUILDTYPE build of OZW)
exists( $$top_srcdir/../open-zwave/cpp/src/) {
message("Found OZW in $$absolute_path($$top_srcdir/../open-zwave/cpp/src)")
OZW_LIB_PATH = $$absolute_path($$top_srcdir/../open-zwave/)
INCLUDEPATH += $$absolute_path($$top_srcdir/../open-zwave/cpp/src/)/
exists( $$OZW_LIB_PATH/cpp/build/windows/vs2010/ReleaseDLL/OpenZWave.dll) {
LIBS += -L$$absolute_path($$top_srcdir/../open-zwave/cpp/build/windows/vs2010/ReleaseDLL) -lopenzwave
} else {
exists ( $$top_srcdir../open-zwave/cpp/build/windows/vs2010/DebugDLL/OpenZWave.dll) {
LIBS += -L$$absolute_path($$top_srcdir/../open-zwave/cpp/build/windows/vs2010/DebugDLL) -lopenzwave
equals(BUILDTYPE, "release") {
exists( $$absolute_path($$top_srcdir/../open-zwave/cpp/build/windows/vs2010/ReleaseDLL/OpenZWave.dll ) ) {
LIBS += -L$$absolute_path($$top_srcdir/../open-zwave/cpp/build/windows/vs2010/ReleaseDLL) -lopenzwave
OZW_LIB_PATH = $$absolute_path($$top_srcdir/../open-zwave/cpp/build/windows/vs2010/ReleaseDLL)
} else {
error("Can't find a copy of OpenZWave.dll in the DebugDLL or ReleaseDLL Directory");
error("Can't find a copy of OpenZWave.dll in the ReleaseDLL Directory");
}
} else {
equals(BUILDTYPE, "debug") {
exists ( $$absolute_path($$top_srcdir/../open-zwave/cpp/build/windows/vs2010/DebugDLL/OpenZWaved.dll )) {
LIBS += -L$$absolute_path($$top_srcdir/../open-zwave/cpp/build/windows/vs2010/DebugDLL) -lopenzwaved
OZW_LIB_PATH = $$absolute_path($$top_srcdir/../open-zwave/cpp/build/windows/vs2010/ReleaseDLL)
} else {
error("Can't find a copy of OpenZWaved.dll in the DebugDLL Directory");
}
}
}
isEmpty(OZW_LIB_PATH) {
error("Can't find a copy of OpenZWave with the right builds");
}
} else {
error("Can't Find a copy of OpenZwave")
}
CONFIG(debug,debug|release) BUILDTYPE = debug
CONFIG(release,debug|release) BUILDTYPE = release
}

View file

@ -8,7 +8,7 @@ TEMPLATE = subdirs
CONFIG += ordered silent
SUBDIRS = qt-openzwave \
SUBDIRS += qt-openzwave \
qt-openzwavedatabase \
qt-ozwdaemon \
qt-simpleclient

View file

@ -35,6 +35,14 @@
#include <QDataStream>
#include <QDebug>
#if defined(QTOPENZWAVE_LIBRARY)
#define QTOPENZWAVESHARED_EXPORT Q_DECL_EXPORT
#else
#define QTOPENZWAVESHARED_EXPORT Q_DECL_IMPORT
#define OPENZWAVE_USEDLL 1
#endif
/** \brief Statistics Relating to Communications with Nodes on your Network
*/
struct NodeStatistics {
@ -178,7 +186,7 @@ inline QDataStream &operator>>(QDataStream &ds, NodeStatistics &obj) {
* in fact a ENUM of a limited set of Possible Values. This simple
* Class allows us to represent those value
*/
class OptionList
class QTOPENZWAVESHARED_EXPORT OptionList
{
Q_GADGET
friend QDataStream &operator<<(QDataStream &ds, const OptionList &obj);