From 8b1a1c9b925e2f80e2f495fd54d99f7b3537017c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Remko=20Tron=C3=A7on?= Date: Sun, 9 Aug 2009 20:18:45 +0200 Subject: Fixed SCons Mac OS X build. diff --git a/site_scons/site_tools/qt4.py b/site_scons/site_tools/qt4.py index f84485a..2fd26aa 100644 --- a/site_scons/site_tools/qt4.py +++ b/site_scons/site_tools/qt4.py @@ -446,7 +446,7 @@ def enable_modules(self, modules, debug=False, crosscompiling=False) : try : self.AppendUnique(CPPDEFINES=moduleDefines[module]) except: pass debugSuffix = '' - if sys.platform in ["darwin", "linux2"] and not crosscompiling : + if sys.platform in ["linux2"] and not crosscompiling : if debug : debugSuffix = '_debug' for module in modules : if module not in pclessModules : continue @@ -490,26 +490,23 @@ def enable_modules(self, modules, debug=False, crosscompiling=False) : self["QT4_MOCCPPPATH"] = self["CPPPATH"] self.AppendUnique(LIBPATH=[os.path.join('$QTDIR','lib')]) return - """ if sys.platform=="darwin" : - # TODO: Test debug version on Mac self.AppendUnique(LIBPATH=[os.path.join('$QTDIR','lib')]) self.AppendUnique(LINKFLAGS="-F$QTDIR/lib") + self.AppendUnique(CPPFLAGS="-F$QTDIR/lib") self.AppendUnique(LINKFLAGS="-L$QTDIR/lib") #TODO clean! + self.Append(LINKFLAGS=['-framework', "phonon"]) if debug : debugSuffix = 'd' for module in modules : # self.AppendUnique(CPPPATH=[os.path.join("$QTDIR","include")]) # self.AppendUnique(CPPPATH=[os.path.join("$QTDIR","include",module)]) # port qt4-mac: - self.AppendUnique(CPPPATH=[os.path.join("$QTDIR","include", "qt4")]) - self.AppendUnique(CPPPATH=[os.path.join("$QTDIR","include", "qt4", module)]) if module in staticModules : self.AppendUnique(LIBS=[module+debugSuffix]) # TODO: Add the debug suffix self.AppendUnique(LIBPATH=[os.path.join("$QTDIR","lib")]) else : -# self.Append(LINKFLAGS=['-framework', module]) -# port qt4-mac: - self.Append(LIBS=module) + self.Append(CPPFLAGS = ["-I" + os.path.join("$QTDIR", "lib", module + ".framework", "Versions", "4", "Headers")]) + self.Append(LINKFLAGS=['-framework', module]) if 'QtOpenGL' in modules: self.AppendUnique(LINKFLAGS="-F/System/Library/Frameworks") self.Append(LINKFLAGS=['-framework', 'AGL']) #TODO ughly kludge to avoid quotes @@ -519,7 +516,6 @@ def enable_modules(self, modules, debug=False, crosscompiling=False) : # This should work for mac but doesn't # env.AppendUnique(FRAMEWORKPATH=[os.path.join(env['QTDIR'],'lib')]) # env.AppendUnique(FRAMEWORKS=['QtCore','QtGui','QtOpenGL', 'AGL']) - """ def exists(env): -- cgit v0.10.2-6-g49f6