diff options
Diffstat (limited to 'Swiften/SConscript')
-rw-r--r-- | Swiften/SConscript | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/Swiften/SConscript b/Swiften/SConscript index a37767c..29298ca 100644 --- a/Swiften/SConscript +++ b/Swiften/SConscript @@ -44,70 +44,73 @@ if env["SCONS_STAGE"] == "flags" : swiften_env["LIBPATH"] = [Dir(".")] swiften_env["LIBRUNPATH"] = [Dir(".")] swiften_env["LIBS"] = [swiften_env["SWIFTEN_LIBRARY"]] if not env["SWIFTEN_DLL"] : swiften_env.Append(CPPDEFINES = ["SWIFTEN_STATIC"]) dep_env = env.Clone() for module in swiften_dep_modules : module_flags = env.get(module + "_FLAGS", {}) if env.get(module + "_BUNDLED", False) : if module in external_swiften_dep_modules : swiften_env.UseFlags(module_flags) else : if module in external_swiften_dep_modules : dep_env.UseFlags(module_flags) else : # Expose only libraries dep_env.Append(LIBPATH = module_flags.get("LIBPATH", [])) dep_env.Append(LIBS = module_flags.get("LIBS", [])) dep_env.Append(FRAMEWORKS = module_flags.get("FRAMEWORKS", [])) dep_env.UseFlags(dep_env["PLATFORM_FLAGS"]) if env.get("HAVE_SCHANNEL", 0) : dep_env.Append(LIBS = ["Winscard"]) for var, e in [("SWIFTEN_FLAGS", swiften_env), ("SWIFTEN_DEP_FLAGS", dep_env)] : env[var] = { "CPPDEFINES": e.get("CPPDEFINES", []), "CPPPATH": e.get("CPPPATH", []), "CPPFLAGS": e.get("CPPFLAGS", []), "LIBPATH": e.get("LIBPATH", []), "LIBRUNPATH": e.get("LIBRUNPATH", []), "LIBS": e.get("LIBS", []), "FRAMEWORKS": e.get("FRAMEWORKS", []), } + if env["PLATFORM"] == "win32" : + env.Append(CPPDEFINES = [("_WIN32_WINNT","_WIN32_WINNT_VISTA") , ("NTDDI_VERSION","NTDDI_VISTA")]) + ################################################################################ # Build ################################################################################ if env["SCONS_STAGE"] == "build" : swiften_env = env.Clone() swiften_env.Append(CPPDEFINES = ["SWIFTEN_BUILDING"]) for module in swiften_dep_modules : swiften_env.UseFlags(swiften_env.get(module + "_FLAGS", {})) if env.get(module + "_BUNDLED", False) : swiften_env.Append(SWIFTEN_OBJECTS = env.get(module + "_OBJECTS", [])) swiften_env.UseFlags(swiften_env["PLATFORM_FLAGS"]) if swiften_env["SWIFTEN_DLL"] : swiften_env.AddMethod(lambda e,l,o : e.SharedLibrary(l,o), "SwiftenLibrary") else : swiften_env.Append(CPPDEFINES = ["SWIFTEN_STATIC"]) swiften_env.AddMethod(lambda e,l,o : e.StaticLibrary(l,o), "SwiftenLibrary") Export("swiften_env") # TODO: Move all this to a submodule SConscript sources = [ "Chat/ChatStateTracker.cpp", "Chat/ChatStateNotifier.cpp", "Client/ClientSessionStanzaChannel.cpp", "Client/CoreClient.cpp", "Client/Client.cpp", "Client/ClientXMLTracer.cpp", "Client/ClientSession.cpp", "Client/BlockList.cpp", "Client/BlockListImpl.cpp", "Client/ClientBlockListManager.cpp", "Client/MemoryStorages.cpp", "Client/NickResolver.cpp", "Client/NickManager.cpp", |