-
Notifications
You must be signed in to change notification settings - Fork 51
/
qtzeroconf.pri
137 lines (127 loc) · 3.71 KB
/
qtzeroconf.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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
# for Qt4 on Linux
lessThan(QT_MAJOR_VERSION, 5) {
HEADERS+= $$PWD/qzeroconf.h $$PWD/avahi-qt/qt-watch.h $$PWD/avahi-qt/qt-watch_p.h
SOURCES+= $$PWD/avahiclient.cpp $$PWD/avahi-qt/qt-watch.cpp
LIBS+= -lavahi-client -lavahi-common
QMAKE_CXXFLAGS+= -I$$PWD
}
# below for >= Qt5
linux:!android:!ubports {
HEADERS+= $$PWD/qzeroconf.h $$PWD/avahi-qt/qt-watch.h $$PWD/avahi-qt/qt-watch_p.h
SOURCES+= $$PWD/avahiclient.cpp $$PWD/avahi-qt/qt-watch.cpp
LIBS+= -lavahi-client -lavahi-common
QMAKE_CXXFLAGS+= -I$$PWD
}
freebsd {
HEADERS+= $$PWD/qzeroconf.h $$PWD/avahi-qt/qt-watch.h $$PWD/avahi-qt/qt-watch_p.h
SOURCES+= $$PWD/avahiclient.cpp $$PWD/avahi-qt/qt-watch.cpp
LIBS+= -lavahi-client -lavahi-common
QMAKE_CXXFLAGS+= -I$$PWD
}
win32 {
DEFINES+= WIN32
DEFINES+= NDEBUG
DEFINES+= _WINDOWS
DEFINES+= _USRDLL
DEFINES+= MDNS_DEBUGMSGS=0
DEFINES+= WIN32_LEAN_AND_MEAN
DEFINES+= USE_TCP_LOOPBACK
DEFINES+= _CRT_SECURE_NO_DEPRECATE
DEFINES+= _CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES=1
DEFINES+= NOT_HAVE_SA_LEN
QMAKE_CFLAGS+= -I$$PWD/bonjour-sdk
QMAKE_CXXFLAGS+= -I$$PWD/bonjour-sdk -I$$PWD
HEADERS+= $$PWD/qzeroconf.h $$PWD/bonjour_p.h
SOURCES+= $$PWD/bonjour.cpp
SOURCES+= $$PWD/bonjour-sdk/dnssd_clientlib.c
SOURCES+= $$PWD/bonjour-sdk/dnssd_clientstub.c
SOURCES+= $$PWD/bonjour-sdk/dnssd_ipc.c
LIBS+= -lws2_32 -lwsock32
}
macx {
HEADERS+= $$PWD/qzeroconf.h $$PWD/bonjour_p.h
SOURCES+= $$PWD/bonjour.cpp
QMAKE_LFLAGS += -F /System/Library/Frameworks/CoreServices.framework/
LIBS+= -framework CoreServices
QMAKE_CXXFLAGS+= -I$$PWD
}
ios {
HEADERS+= $$PWD/qzeroconf.h $$PWD/bonjour_p.h
SOURCES+= $$PWD/bonjour.cpp
QMAKE_CXXFLAGS+= -I$$PWD
}
ubports: {
QMAKE_CXXFLAGS+= -I$$PWD
QMAKE_CFLAGS+= -I$$PWD
ACM = $$PWD/avahi-common
ACR = $$PWD/avahi-core
HEADERS+= $$PWD/qzeroconf.h $$PWD/avahi-qt/qt-watch.h $$PWD/avahi-qt/qt-watch_p.h
SOURCES+= $$PWD/avahicore.cpp $$PWD/avahi-qt/qt-watch.cpp
# avahi-common
android: {
DEFINES+= HAVE_STRLCPY GETTEXT_PACKAGE
}
ubports: {
DEFINES+= _GNU_SOURCE GETTEXT_PACKAGE
}
SOURCES+= $$ACM/address.c
SOURCES+= $$ACM/alternative.c
SOURCES+= $$ACM/domain.c
SOURCES+= $$ACM/error.c
SOURCES+= $$ACM/i18n.c
SOURCES+= $$ACM/malloc.c
SOURCES+= $$ACM/rlist.c
SOURCES+= $$ACM/simple-watch.c
SOURCES+= $$ACM/strlst.c
SOURCES+= $$ACM/thread-watch.c
SOURCES+= $$ACM/timeval.c
SOURCES+= $$ACM/utf8.c
# avahi-core
DEFINES+= HAVE_NETLINK
SOURCES+= $$ACR/addr-util.c
SOURCES+= $$ACR/announce.c
SOURCES+= $$ACR/browse.c
SOURCES+= $$ACR/browse-dns-server.c
SOURCES+= $$ACR/browse-domain.c
SOURCES+= $$ACR/browse-service.c
SOURCES+= $$ACR/browse-service-type.c
SOURCES+= $$ACR/cache.c
SOURCES+= $$ACR/dns.c
SOURCES+= $$ACR/domain-util.c
SOURCES+= $$ACR/entry.c
SOURCES+= $$ACR/fdutil.c
SOURCES+= $$ACR/hashmap.c
SOURCES+= $$ACR/iface.c
SOURCES+= $$ACR/iface-linux.c
SOURCES+= $$ACR/log.c
SOURCES+= $$ACR/multicast-lookup.c
SOURCES+= $$ACR/netlink.c
SOURCES+= $$ACR/prioq.c
SOURCES+= $$ACR/probe-sched.c
SOURCES+= $$ACR/querier.c
SOURCES+= $$ACR/query-sched.c
SOURCES+= $$ACR/resolve-address.c
SOURCES+= $$ACR/resolve-host-name.c
SOURCES+= $$ACR/resolve-service.c
SOURCES+= $$ACR/response-sched.c
SOURCES+= $$ACR/rr.c
SOURCES+= $$ACR/rrlist.c
SOURCES+= $$ACR/server.c
SOURCES+= $$ACR/socket.c
SOURCES+= $$ACR/timeeventq.c
SOURCES+= $$ACR/util.c
SOURCES+= $$ACR/wide-area.c
#avahi-core/iface-none.c avahi-core/iface-pfroute.c avahi-core/avahi-reflector.c
}
android: {
lessThan(QT_MAJOR_VERSION, 6) {
QT += androidextras
}
QT += gui
INCLUDEPATH += $$PWD
HEADERS += $$PWD/qzeroconf.h $$PWD/androidnsd_p.h
SOURCES += $$PWD/androidnsd.cpp
DISTFILES += $$PWD/QZeroConfNsdManager.java
}
HEADERS+= $$PWD/qzeroconfservice.h $$PWD/qzeroconfglobal.h
SOURCES+= $$PWD/qzeroconfservice.cpp