From aa8c0d679f1d175dc6a61a6dd4b7a513ab486538 Mon Sep 17 00:00:00 2001 From: Robin Dunn Date: Sat, 17 Mar 2012 20:37:51 +0000 Subject: [PATCH] build fixes for wxGTK git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@70930 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- buildtools/config.py | 5 +++-- wscript | 13 +++++++++++-- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/buildtools/config.py b/buildtools/config.py index 1a29ec30..7f38e077 100644 --- a/buildtools/config.py +++ b/buildtools/config.py @@ -226,7 +226,9 @@ class Configuration(object): self.WXBASENAME = self.getWxConfigValue('--basename') self.WXRELEASE = self.getWxConfigValue('--release') self.WXPREFIX = self.getWxConfigValue('--prefix') - + + self.CC = self.CXX = None + # wxMac settings if sys.platform[:6] == "darwin": self.WXPLAT = '__WXMAC__' @@ -244,7 +246,6 @@ class Configuration(object): self.lflags.append("-arch") self.lflags.append(self.ARCH) - self.CC = self.CXX = None if not os.environ.get('CC') or not os.environ.get('CXX'): self.CC = os.environ["CC"] = self.getWxConfigValue('--cc') self.CXX = os.environ["CXX"] = self.getWxConfigValue('--cxx') diff --git a/wscript b/wscript index 72ec5eec..f7498170 100644 --- a/wscript +++ b/wscript @@ -68,6 +68,15 @@ def configure(conf): # sets of flags stored to use with different extension modules below. # WXGL, WXHTML, etc. + # NOTE: This assumes that if the platform is not win32 (from + # the test above) and not darwin then we must be using the + # GTK2 port of wxWidgets. If we ever support other ports then + # this code will need to be adjusted. + if sys.platform != 'darwin': + gtkflags = os.popen('pkg-config gtk+-2.0 --cflags', 'r').read()[:-1] + conf.env.CFLAGS_WX += gtkflags.split() + conf.env.CXXFLAGS_WX += gtkflags.split() + # finish configuring the Config object cfg.finishSetup(conf.env.wx_config, conf.env.debug) @@ -156,7 +165,7 @@ def build(bld): # Create the build tasks for each of our extension modules. siplib = bld( - features = 'c cxx cxxshlib pyext', + features = 'c cxx cshlib cxxshlib pyext', target = 'siplib', source = ['sip/siplib/apiversions.c', 'sip/siplib/bool.cpp', @@ -170,7 +179,7 @@ def build(bld): uselib = 'WX WXPY', ) makeExtCopyRule(bld, 'siplib') - + etg = loadETG('etg/_core.py') rc = ['src/wxc.rc'] if sys.platform == 'win32' else []