diff options
Diffstat (limited to 'Swiften/Config/SConscript')
-rw-r--r-- | Swiften/Config/SConscript | 31 |
1 files changed, 23 insertions, 8 deletions
diff --git a/Swiften/Config/SConscript b/Swiften/Config/SConscript index 357a5e6..837884b 100644 --- a/Swiften/Config/SConscript +++ b/Swiften/Config/SConscript @@ -6,7 +6,7 @@ def replaceSwiftenPath(input) : return input.replace(env.Dir("#").abspath, "#") def cStringVariable(env, cVar, sconsVar) : - result = "const char* " + cVar + "[] = {\n" + result = "static const char* " + cVar + "[] = {\n" # FIXME: Probably not very robust for var in sconsVar.split(" ") : result += "\t\"" + env.subst(var).replace("\\", "\\\\") + "\",\n" @@ -17,23 +17,38 @@ def cStringVariable(env, cVar, sconsVar) : config_flags = "" swiften_env = env.Clone() -swiften_env.MergeFlags(swiften_env["SWIFTEN_FLAGS"]) -swiften_env.MergeFlags(swiften_env["SWIFTEN_DEP_FLAGS"]) +swiften_env.UseFlags(swiften_env["SWIFTEN_FLAGS"]) +swiften_env.UseFlags(swiften_env["SWIFTEN_DEP_FLAGS"]) -cppflags = replaceSwiftenPath(" ".join([swiften_env.subst("$_CPPDEFFLAGS"), swiften_env.subst("$_CPPINCFLAGS")])) +cppflags = replaceSwiftenPath(" ".join([ + swiften_env.subst("$CPPFLAGS").replace("-isystem ","-I"), + swiften_env.subst("$_CPPDEFFLAGS"), + swiften_env.subst("$_CPPINCFLAGS")])) config_flags += cStringVariable(swiften_env, "CPPFLAGS", cppflags) -libflags = replaceSwiftenPath(" ".join([swiften_env.subst("$_LIBDIRFLAGS"), swiften_env.subst("$_LIBFLAGS")])) +libflags = replaceSwiftenPath(" ".join([ + swiften_env.subst("$_LIBDIRFLAGS"), + swiften_env.subst("$_LIBFLAGS"), + swiften_env.subst("$_FRAMEWORKPATH"), + swiften_env.subst("$_FRAMEWORKS"), + swiften_env.subst("$_FRAMEWORKSFLAGS") + ])) config_flags += cStringVariable(swiften_env, "LIBFLAGS", libflags) config_env = env.Clone() # Create a local copy of Paths.cpp to avoid a Swiften dependency -config_env.Install(".", "#/Swiften/Base/Paths.cpp") -config_env.MergeFlags(config_env["BOOST_FLAGS"]) -config_env.MergeFlags(config_env["PLATFORM_FLAGS"]) +config_env.Install(".", [ + "#/Swiften/Base/Paths.cpp", + "#/Swiften/Base/Path.cpp", + "#/Swiften/Base/String.cpp", +]) +config_env.UseFlags(config_env["BOOST_FLAGS"]) +config_env.UseFlags(config_env["PLATFORM_FLAGS"]) config_env.WriteVal("swiften-config.h", config_env.Value(config_flags)) swiften_config = config_env.Program("swiften-config", [ "Paths.cpp", + "Path.cpp", + "String.cpp", "swiften-config.cpp" ]) |