Find wxWidgets on Fedora 22.
authorCarl Hetherington <cth@carlh.net>
Wed, 30 Sep 2015 09:21:48 +0000 (10:21 +0100)
committerCarl Hetherington <cth@carlh.net>
Wed, 30 Sep 2015 09:21:48 +0000 (10:21 +0100)
src/wx/wscript

index 34a7608dfdbfa159371a15fb4565dbe6315cb342..1fb35f1cdd602ccd79c702be1fc2f073ac40477f 100644 (file)
@@ -86,12 +86,22 @@ sources = """
           """
 
 def configure(conf):
-    conf.check_cfg(msg='Checking for wxWidgets',
-                   package='',
-                   path='wx-config',
-                   args='--cppflags --cxxflags --libs std,richtext',
-                   uselib_store='WXWIDGETS',
-                   mandatory=True)
+    try:
+        wx_config = 'wx-config-3.0-gtk2'
+        conf.check_cfg(msg='Checking for wxWidgets',
+                       package='',
+                       path=wx_config,
+                       args='--cppflags --cxxflags --libs std,richtext',
+                       uselib_store='WXWIDGETS',
+                       mandatory=True)
+    except:
+        wx_config = 'wx-config'
+        conf.check_cfg(msg='Checking for wxWidgets',
+                       package='',
+                       path=wx_config,
+                       args='--cppflags --cxxflags --libs std,richtext',
+                       uselib_store='WXWIDGETS',
+                       mandatory=True)
 
     if conf.options.static_wxwidgets:
        # wx-config returns its static libraries as full paths, without -l prefixes, which confuses
@@ -113,7 +123,7 @@ def configure(conf):
         conf.env.STLIBPATH_WXWIDGETS = stlib_paths
 
     conf.in_msg = 1
-    wx_version = conf.check_cfg(package='', path='wx-config', args='--version').strip()
+    wx_version = conf.check_cfg(package='', 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)