summaryrefslogtreecommitdiffstats
blob: 697037a5e7e8ced846adaa67135f2cf47816b0a8 (plain)
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
Import("swiften_env")

myenv = swiften_env.Clone()
myenv.MergeFlags(swiften_env.get("BONJOUR_FLAGS", ""))

sources = [
        "DNSSD/DNSSDBrowseQuery.cpp",
        "DNSSD/DNSSDQuerier.cpp",
        "DNSSD/DNSSDRegisterQuery.cpp",
        "DNSSD/DNSSDResolveHostnameQuery.cpp",
        "DNSSD/DNSSDResolveServiceQuery.cpp",
        "DNSSD/DNSSDServiceID.cpp",
        "DNSSD/Fake/FakeDNSSDQuerier.cpp",
        "DNSSD/Fake/FakeDNSSDQuery.cpp",
        "DNSSD/PlatformDNSSDQuerierFactory.cpp",
        "IncomingLinkLocalSession.cpp",
        "LinkLocalConnector.cpp",
        "LinkLocalService.cpp",
        "LinkLocalServiceBrowser.cpp",
        "LinkLocalServiceInfo.cpp",
        "OutgoingLinkLocalSession.cpp",
    ]

if myenv.get("HAVE_BONJOUR", 0) :
    myenv.Append(CPPDEFINES = "HAVE_BONJOUR")
    sources += [
            "DNSSD/Bonjour/BonjourQuerier.cpp",
            "DNSSD/Bonjour/BonjourQuery.cpp",
        ]
elif myenv.get("HAVE_AVAHI", 0) :
    myenv.Append(CPPDEFINES = ["HAVE_AVAHI"])
    sources += [
            "DNSSD/Avahi/AvahiQuerier.cpp",
            "DNSSD/Avahi/AvahiQuery.cpp",
            "DNSSD/Avahi/AvahiResolveHostnameQuery.cpp",
            "DNSSD/Avahi/AvahiResolveServiceQuery.cpp",
            "DNSSD/Avahi/AvahiRegisterQuery.cpp",
            "DNSSD/Avahi/AvahiBrowseQuery.cpp",
        ]

objects = myenv.SwiftenObject(sources)
swiften_env.Append(SWIFTEN_OBJECTS = [objects])