More arch build fixes (#1449).
[dcpomatic.git] / src / wx / wscript
index 79b1490c57c6c644230ada689dd3f498078633d8..3be3a6763695b0e0ab620224c607479408dfecd3 100644 (file)
@@ -59,6 +59,7 @@ sources = """
           filter_editor.cc
           fonts_dialog.cc
           font_files_dialog.cc
+          full_config_dialog.cc
           gain_calculator_dialog.cc
           hints_dialog.cc
           job_view.cc
@@ -75,10 +76,13 @@ sources = """
           name_format_editor.cc
           new_dkdm_folder_dialog.cc
           normal_job_view.cc
+          paste_dialog.cc
+          player_config_dialog.cc
           player_information.cc
           playhead_to_timecode_dialog.cc
           playhead_to_frame_dialog.cc
           question_dialog.cc
+          recreate_chain_dialog.cc
           repeat_dialog.cc
           report_problem_dialog.cc
           rename_template_dialog.cc
@@ -118,22 +122,34 @@ sources = """
           """
 
 def configure(conf):
+
+    wx_libs = 'core,richtext,adv,html,xml'
+
     try:
-        wx_config = 'wx-config-3.0-gtk2'
-        conf.check_cfg(msg='Checking for wxWidgets using wx-config-3.0-gtk2',
+        wx_config = '/usr/lib64/wx/config/gtk2-unicode-3.0'
+        conf.check_cfg(msg='Checking for wxWidgets using gtk2-unicode-3.0',
                        package='',
                        path=wx_config,
-                       args='--cppflags --cxxflags --libs std,richtext',
+                       args='--cppflags --cxxflags --libs %s' % wx_libs,
                        uselib_store='WXWIDGETS',
                        mandatory=True)
     except:
-        wx_config = 'wx-config'
-        conf.check_cfg(msg='Checking for wxWidgets using wx-config',
-                       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 using wx-config-3.0-gtk2',
+                           package='',
+                           path=wx_config,
+                           args='--cppflags --cxxflags --libs %s' % wx_libs,
+                           uselib_store='WXWIDGETS',
+                           mandatory=True)
+        except:
+            wx_config = 'wx-config'
+            conf.check_cfg(msg='Checking for wxWidgets using wx-config',
+                           package='',
+                           path=wx_config,
+                           args='--cppflags --cxxflags --libs %s' % wx_libs,
+                           uselib_store='WXWIDGETS',
+                           mandatory=True)
 
     if conf.options.static_wxwidgets:
        # wx-config returns its static libraries as full paths, without -l prefixes, which confuses
@@ -155,8 +171,8 @@ 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()
-    conf.im_msg = 0
+    wx_version = subprocess.check_output([wx_config, '--version']).decode('UTF-8')
+    conf.in_msg = 0
     if not wx_version.startswith('3.0.'):
         conf.fatal('wxwidgets version 3.0.x is required; %s found' % wx_version)