summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemko Tronçon <git@el-tramo.be>2013-07-15 18:04:19 (GMT)
committerRemko Tronçon <git@el-tramo.be>2013-07-15 18:04:19 (GMT)
commitd31fe6a73cf29df1e7bf0edd76c30aa124bb0328 (patch)
tree7075b946eb9909a276e754b65436d3d7455dc5d0 /BuildTools/SCons/Tools
parentffb8c6b0cdcdfa133680d87a1cebe8fecff8426b (diff)
downloadswift-contrib-d31fe6a73cf29df1e7bf0edd76c30aa124bb0328.zip
swift-contrib-d31fe6a73cf29df1e7bf0edd76c30aa124bb0328.tar.bz2
Fixed Qt5 compilation on Windows.
Change-Id: I2d4de311e7d8c6909f6a35dbb650380e2b0b1da9
Diffstat (limited to 'BuildTools/SCons/Tools')
-rw-r--r--BuildTools/SCons/Tools/WindowsBundle.py7
-rw-r--r--BuildTools/SCons/Tools/qt4.py8
2 files changed, 11 insertions, 4 deletions
diff --git a/BuildTools/SCons/Tools/WindowsBundle.py b/BuildTools/SCons/Tools/WindowsBundle.py
index c3c77aa..2c0b3a4 100644
--- a/BuildTools/SCons/Tools/WindowsBundle.py
+++ b/BuildTools/SCons/Tools/WindowsBundle.py
@@ -1,12 +1,15 @@
import SCons.Util, os
def generate(env) :
- def createWindowsBundle(env, bundle, resources = {}, qtimageformats = [], qtlibs = []) :
+ def createWindowsBundle(env, bundle, resources = {}, qtimageformats = [], qtlibs = [], qtversion = '4') :
all_files = []
all_files += env.Install(bundle, bundle + ".exe")
for lib in qtlibs :
all_files += env.Install(bundle, os.path.join(env["QTDIR"], "bin", lib + ".dll"))
- all_files += env.Install(os.path.join(bundle, "imageformats"), [os.path.join(env["QTDIR"], "plugins", "imageformats", "q" + codec + "4.dll") for codec in qtimageformats])
+ imageformats_suffix = '4'
+ if qtversion == '5' :
+ imageformats_suffix = ''
+ all_files += env.Install(os.path.join(bundle, "imageformats"), [os.path.join(env["QTDIR"], "plugins", "imageformats", "q" + codec + imageformats_suffix + ".dll") for codec in qtimageformats])
for dir, resourceFiles in resources.items() :
for resource in resourceFiles :
diff --git a/BuildTools/SCons/Tools/qt4.py b/BuildTools/SCons/Tools/qt4.py
index 8e174c0..02701e7 100644
--- a/BuildTools/SCons/Tools/qt4.py
+++ b/BuildTools/SCons/Tools/qt4.py
@@ -479,13 +479,17 @@ def enable_modules(self, modules, debug=False, crosscompiling=False, version='4'
self.AppendUnique(CPPPATH=[os.path.join("$QTDIR","include","QtAssistant")])
modules.remove("QtAssistant")
modules.append("QtAssistantClient")
- # FIXME: Phonon Hack
if version == '4' :
+ # FIXME: Phonon Hack
self.AppendUnique(LIBS=['phonon'+debugSuffix+version])
- self.AppendUnique(LIBS=[lib+debugSuffix+version for lib in modules if lib not in staticModules])
+ self.AppendUnique(LIBS=[lib+debugSuffix+version for lib in modules if lib not in staticModules])
+ else :
+ self.AppendUnique(LIBS=[lib.replace('Qt', 'Qt5') + debugSuffix for lib in modules if lib not in staticModules])
self.PrependUnique(LIBS=[lib+debugSuffix for lib in modules if lib in staticModules])
if 'QtOpenGL' in modules:
self.AppendUnique(LIBS=['opengl32'])
+ elif version == '5' :
+ self.Append(CPPDEFINES = ["QT_NO_OPENGL"])
self.AppendUnique(CPPPATH=[ '$QTDIR/include/'])
self.AppendUnique(CPPPATH=[ '$QTDIR/include/'+module for module in modules])
if crosscompiling :