summaryrefslogtreecommitdiffstats
blob: 2d1d33b330385444924eb2fdd513eb66cbc6f12a (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
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 "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.MergeFlags(env["BOOST_FLAGS"])
		myenv.MergeFlags(env["SWIFTEN_FLAGS"])
		myenv.StaticLibrary("Slimber", [
				"LinkLocalPresenceManager.cpp",
				"FileVCardCollection.cpp",
				"VCardCollection.cpp",
				"Server.cpp",
				"MainController.cpp",
				"MenuletController.cpp",
				"Menulet.cpp"
			])

		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")