Add patron.
[dcpomatic.git] / src / wx / wscript
index 8430b58441708ceae68dbc4c249dfb5d7901ad5c..5dbf75ecb93a4eb41f73a25e4b0d9963ea8d2bbf 100644 (file)
@@ -48,6 +48,7 @@ sources = """
           content_view.cc
           controls.cc
           closed_captions_dialog.cc
+          credentials_download_certificate_panel.cc
           dcp_panel.cc
           dcpomatic_button.cc
           email_dialog.cc
@@ -144,6 +145,7 @@ sources = """
           update_dialog.cc
           verify_dcp_dialog.cc
           video_panel.cc
+          video_view.cc
           video_waveform_dialog.cc
           video_waveform_plot.cc
           wx_util.cc
@@ -180,6 +182,11 @@ def configure(conf):
                            uselib_store='WXWIDGETS',
                            mandatory=True)
 
+    if conf.env.TARGET_LINUX:
+        conf.env.append_value('CXXFLAGS', ['-DGLX_GLXEXT_PROTOTYPES'])
+    if conf.env.TARGET_WINDOWS:
+        conf.env.append_value('CXXFLAGS', ['-DWGL_WGLEXT_PROTOTYPES'])
+
     if conf.options.static_wxwidgets:
        # wx-config returns its static libraries as full paths, without -l prefixes, which confuses
         # check_cfg().  It puts the static libraries into LINKFLAGS_WXWIDGETS, so fish them out.
@@ -254,6 +261,22 @@ def configure(conf):
         conf.env.STLIB_GL = 'gl'
         conf.env.STLIB_GLU = 'glu'
 
+    if conf.env.TARGET_LINUX:
+        conf.check_cxx(fragment="""
+                                #include <wx/glcanvas.h>
+                                #include <GL/glu.h>
+                                #include <GL/glext.h>
+                                #include <GL/glxext.h>
+                                int main() {
+                                    glXSwapIntervalEXT (0, 0, 1);
+                                    return 0;
+                                }
+                                """,
+                       msg='Checking for glXSwapIntervalEXT',
+                       okmsg='yes',
+                       uselib='GL WXWIDGETS',
+                       define_name='DCPOMATIC_HAVE_GLX_SWAP_INTERVAL_EXT',
+                       mandatory=False)
 
 
 def build(bld):
@@ -272,7 +295,7 @@ def build(bld):
     if bld.env.TARGET_OSX:
         obj.framework = ['CoreAudio', 'OpenGL']
     obj.use = 'libdcpomatic2'
-    if bld.env.VARIANT == 'swaroop':
+    if not len(bld.env.VARIANT) == 0 and bld.env.VARIANT.startswith('swaroop-'):
         obj.source = sources + " swaroop_controls.cc"
     else:
         obj.source = sources