We must only link gtk2 if wx is also using it.
authorCarl Hetherington <cth@carlh.net>
Thu, 21 May 2020 22:26:53 +0000 (00:26 +0200)
committerCarl Hetherington <cth@carlh.net>
Thu, 21 May 2020 22:26:53 +0000 (00:26 +0200)
src/wx/wscript
wscript

index 83e2022..339ebb1 100644 (file)
@@ -225,6 +225,10 @@ def configure(conf):
     if not wx_version.startswith('3.0.'):
         conf.fatal('wxwidgets version 3.0.x 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',
                        package='rtaudio',
diff --git a/wscript b/wscript
index 86c65ad..f49b491 100644 (file)
--- a/wscript
+++ b/wscript
@@ -199,8 +199,6 @@ def configure(conf):
         conf.env.append_value('CXXFLAGS', '-DDCPOMATIC_LINUX')
         conf.env.append_value('CXXFLAGS', ['-Wlogical-op', '-Wcast-align'])
         conf.check(lib='dl', uselib_store='DL', msg='Checking for library dl')
-        if not conf.env.DISABLE_GUI:
-            conf.check_cfg(package='gtk+-2.0', args='--cflags --libs', uselib_store='GTK', mandatory=True)
 
     # OSX
     if conf.env.TARGET_OSX: