summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTobias Markmann <tm@ayena.de>2014-10-16 09:31:55 (GMT)
committerSwift Review <review@swift.im>2014-10-16 16:09:49 (GMT)
commitc02aedbe59a3abc2a7b84b7e1a8bf3a7f11ee20f (patch)
tree7d8702318423434e89cbf70bbbd563ba5d46eacd /Swiften/SConscript
parent80a0e4117219a196f9f2c09e243713b26ead763f (diff)
downloadswift-contrib-c02aedbe59a3abc2a7b84b7e1a8bf3a7f11ee20f.zip
swift-contrib-c02aedbe59a3abc2a7b84b7e1a8bf3a7f11ee20f.tar.bz2
Specify minimal Windows API version for Windows builds.
This sets _WIN32_WINNT and NTDDI_VERSION defines. The minimal version required is Windows Vista since smart card support requires this version. Test-Information: With these defines Swift/-en builds successfully on Windows 8.1 with VisualStudio Express 2013 for Desktop. Change-Id: I8745f201559cd9c401caef7661f09939dffae38f
Diffstat (limited to 'Swiften/SConscript')
-rw-r--r--Swiften/SConscript3
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",