forked from OpenZWave/qt-openzwave
-
Notifications
You must be signed in to change notification settings - Fork 0
/
qt-openzwave.pri
71 lines (67 loc) · 2.86 KB
/
qt-openzwave.pri
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
top_srcdir=$$PWD
top_builddir=$$shadowed($$PWD)
mac {
PKG_CONFIG = /usr/local/bin/pkg-config
}
unix {
system("$$PKG_CONFIG --exists openzwave"): USE_PKGCFG = TRUE
isEmpty(OZW_LIB_PATH) {
QT_CONFIG -= no-pkg-config
CONFIG += link_pkgconfig
if (USE_PKGCFG) {
PKGCONFIG += openzwave
message("Using Distribution copy of OZW")
} else {
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/)/
LIBS += -L$$absolute_path($$top_srcdir/../open-zwave/) -lopenzwave
} else {
error("Can't Find a copy of OpenZwave")
}
}
} else {
exists($$OZW_LIB_PATH/cpp/src/) {
INCLUDEPATH += $$absolute_path($$OZW_LIB_PATH/cpp/src/)/
LIBS += -L$$absolute_path($$OZW_LIB_PATH) -lopenzwave
message("Using OZW from Path Supplied in OZW_LIB_PATH varible: $$OZW_LIB_PATH" )
} else {
error("Unable to find a copy of OZW in $$OZW_LIB_PATH")
}
}
}
win32 {
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)")
INCLUDEPATH += $$absolute_path($$top_srcdir/../open-zwave/cpp/src/)/
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 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")
}
}