blob: fa5aa53b2db5c385f2adb381f4367ad14e2c7fc0 (
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
|
import datetime
Import("env")
env["BUILD_SLIMBER"] = True
if env["PLATFORM"] == "win32" :
if not env.get("HAVE_BONJOUR") and "Slimber" in env["PROJECTS"] :
env["PROJECTS"].remove("Slimber")
elif env["PLATFORM"] != "darwin" :
if not env.get("HAVE_AVAHI", False) and "Slimber" in env["PROJECTS"] :
env["PROJECTS"].remove("Slimber")
if not "Slimber" in env["PROJECTS"] and env["SCONS_STAGE"] == "flags" :
print("Bonjour missing. Not building Slimber.")
if not env.get("HAVE_QT", False) and "Slimber" in env["PROJECTS"] :
print("Qt missing. Not building Slimber.")
env["PROJECTS"].remove("Slimber")
if "Slimber" in env["PROJECTS"] :
################################################################################
# Flags
################################################################################
if env["SCONS_STAGE"] == "flags" :
env["SLIMBER_FLAGS"] = {
"LIBPATH": [Dir(".")],
"LIBS": ["Slimber"]
}
################################################################################
# Build
################################################################################
if env["SCONS_STAGE"] == "build" :
myenv = env.Clone()
myenv.UseFlags(env["LIMBER_FLAGS"])
myenv.MergeFlags(env["BOOST_FLAGS"])
myenv.MergeFlags(env["SWIFTEN_FLAGS"])
myenv.MergeFlags(env["SWIFTEN_DEP_FLAGS"])
myenv.StaticLibrary("Slimber", [
"LinkLocalPresenceManager.cpp",
"FileVCardCollection.cpp",
"VCardCollection.cpp",
"Server.cpp",
"MainController.cpp",
"MenuletController.cpp",
"Menulet.cpp"
])
env["SLIMBER_VERSION"] = "0.9.9." + datetime.date.today().strftime("%Y%m%d")
env.Append(UNITTEST_SOURCES = [
File("UnitTest/LinkLocalPresenceManagerTest.cpp"),
File("UnitTest/MenuletControllerTest.cpp")
])
SConscript("CLI/SConscript")
if env["PLATFORM"] == "darwin" :
SConscript("Cocoa/SConscript")
else :
SConscript("Qt/SConscript")
|