summaryrefslogtreecommitdiffstats
path: root/Swift
diff options
context:
space:
mode:
Diffstat (limited to 'Swift')
-rw-r--r--Swift/QtUI/SConscript8
1 files changed, 8 insertions, 0 deletions
diff --git a/Swift/QtUI/SConscript b/Swift/QtUI/SConscript
index 1ecdf4e..c8313c2 100644
--- a/Swift/QtUI/SConscript
+++ b/Swift/QtUI/SConscript
@@ -74,6 +74,14 @@ myenv.EnableQt4Modules(qt4modules, debug = False, version = qt_version)
myenv.Append(CPPPATH = ["."])
+# Qt requires applications to be build with the -fPIC flag on some 32-bit Linux distributions.
+if env["PLATFORM"] == "posix" :
+ testEnv = myenv.Clone()
+ conf = Configure(testEnv)
+ if conf.CheckDeclaration("QT_REDUCE_RELOCATIONS", "#include <QtCore/qconfig.h>") and conf.CheckDeclaration("__i386__"):
+ myenv.AppendUnique(CXXFLAGS = "-fPIC")
+ testEnv = conf.Finish()
+
if env["PLATFORM"] == "win32" :
#myenv.Append(LINKFLAGS = ["/SUBSYSTEM:CONSOLE"])
myenv.Append(LINKFLAGS = ["/SUBSYSTEM:WINDOWS"])