Allow building and running with wxWidgets 3.1.x as well as 3.0.x.
[dcpomatic.git] / src / wx / wscript
index 99720c10912d2a511794c34ef9caea5f1be07a41..2c2820e33e317b2d50a1a6bda037530eeb0b4517 100644 (file)
@@ -194,8 +194,12 @@ def configure(conf):
     conf.in_msg = 1
     wx_version = conf.check_cfg(package='wxwidgets', path=wx_config, args='--version').strip()
     conf.im_msg = 0
-    if not wx_version.startswith('3.0.'):
-        conf.fatal('wxwidgets version 3.0.x is required; %s found' % wx_version)
+    if not wx_version.startswith('3.'):
+        conf.fatal('wxwidgets version 3.x.y is required; %s found' % wx_version)
+
+    config = conf.check_cfg(package='wxwidgets', path=wx_config, args='--selected-config').strip()
+    if config.find('gtk2') != -1:
+        conf.check_cfg(package='gtk+-2.0', args='--cflags --libs', uselib_store='GTK', mandatory=True)
 
     try:
         conf.check_cfg(msg='Checking for RtAudio using pkg-config',