Add support for building with GTK3

This commit is contained in:
Scott Talbert
2016-02-25 20:53:33 -05:00
parent 4ecd949e32
commit a57bec2e71
17 changed files with 54 additions and 21 deletions

View File

@@ -56,8 +56,8 @@ class Configuration(object):
WXPORT = 'gtk2'
# On Linux/Unix there are several ports of wxWidgets available.
# Setting this value lets you select which will be used for the
# wxPython build. Possibilites are 'gtk', 'gtk2' and 'x11'.
# Currently only gtk and gtk2 works.
# wxPython build. Possibilities are 'gtk', 'gtk2', 'gtk3' and 'x11'.
# Currently only gtk, gtk2 and gtk3 work.
BUILD_BASE = "build"
# Directory to use for temporary build files.
@@ -280,6 +280,9 @@ class Configuration(object):
elif self.WXPORT == 'gtk2':
self.WXPLAT = '__WXGTK__'
portcfg = os.popen('pkg-config gtk+-2.0 --cflags', 'r').read()[:-1]
elif self.WXPORT == 'gtk3':
self.WXPLAT = '__WXGTK__'
portcfg = os.popen('pkg-config gtk+-3.0 --cflags', 'r').read()[:-1]
elif self.WXPORT == 'x11':
msg("WARNING: The wxX11 port is no supported")
self.WXPLAT = '__WXX11__'
@@ -349,6 +352,9 @@ class Configuration(object):
def parseCmdLine(self):
self.debug = '--debug' in sys.argv or '-g' in sys.argv
if '--gtk3' in sys.argv:
self.WXPORT = 'gtk3'
# the values of the items in the class namespace that start
# with an upper case letter can be overridden on the command
# line