build fixes for wxGTK

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@70930 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robin Dunn
2012-03-17 20:37:51 +00:00
parent 3a7de14aff
commit aa8c0d679f
2 changed files with 14 additions and 4 deletions

View File

@@ -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')

13
wscript
View File

@@ -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 []