diff options
author | David Robillard <d@drobilla.net> | 2014-10-29 01:14:26 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2014-10-29 01:14:26 +0000 |
commit | fbdb13400bd5e5d77b36bcdf891927c7efc4d0cf (patch) | |
tree | d33db62231cb69799f64cdb7b390db2ee513a3c4 /wscript | |
parent | ca61e810890985e461b96e8461b6e1e43a55752f (diff) | |
download | suil-fbdb13400bd5e5d77b36bcdf891927c7efc4d0cf.tar.gz suil-fbdb13400bd5e5d77b36bcdf891927c7efc4d0cf.tar.bz2 suil-fbdb13400bd5e5d77b36bcdf891927c7efc4d0cf.zip |
Add Cocoa in Gtk wrapper (patch from Robin Gareus) (fix #988).
git-svn-id: http://svn.drobilla.net/lad/trunk/suil@5475 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'wscript')
-rw-r--r-- | wscript | 20 |
1 files changed, 20 insertions, 0 deletions
@@ -4,6 +4,7 @@ import subprocess import sys import waflib.Options as Options import waflib.extras.autowaf as autowaf +from waflib import TaskGen # Library and package version (UNIX style major, minor, micro) # major increment <=> incompatible changes @@ -71,6 +72,9 @@ def configure(conf): autowaf.check_pkg(conf, 'gtk+-x11-2.0', uselib_store='GTK2_X11', atleast_version='2.0.0', mandatory=False) + autowaf.check_pkg(conf, 'gtk+-quartz-2.0', uselib_store='GTK2_QUARTZ', + atleast_version='2.0.0', mandatory=False) + if not Options.options.no_qt: autowaf.check_pkg(conf, 'QtGui', uselib_store='QT4', atleast_version='4.0.0', mandatory=False) @@ -91,6 +95,9 @@ def configure(conf): module_ext += 'D' if conf.env.DEST_OS == 'win32': module_ext += '.dll' + elif conf.env.DEST_OS == 'darwin': + module_prefix = 'lib' + module_ext += '.dylib' else: module_prefix = 'lib' module_ext += '.so' @@ -114,6 +121,7 @@ def build(bld): # C Headers includedir = '${INCLUDEDIR}/suil-%s/suil' % SUIL_MAJOR_VERSION bld.install_files(includedir, bld.path.ant_glob('suil/*.h')) + TaskGen.task_gen.mappings['.mm'] = TaskGen.task_gen.mappings['.cc'] # Pkgconfig file autowaf.build_pc(bld, 'SUIL', SUIL_VERSION, SUIL_MAJOR_VERSION, [], @@ -195,6 +203,18 @@ def build(bld): linkflags = bld.env.NODELETE_FLAGS) autowaf.use_lib(bld, obj, 'GTK2 GTK2_X11 LV2 LV2_1_4_3') + if bld.is_defined('HAVE_GTK2') and bld.is_defined('HAVE_GTK2_QUARTZ'): + obj = bld(features = 'cxx cshlib', + source = 'src/cocoa_in_gtk2.mm', + target = 'suil_cocoa_in_gtk2', + includes = ['.'], + defines = ['SUIL_SHARED', 'SUIL_INTERNAL'], + install_path = module_dir, + cflags = cflags, + lib = modlib, + linkflags = ['-framework', 'Cocoa']) + autowaf.use_lib(bld, obj, 'GTK2 LV2 LV2_1_4_3') + if bld.is_defined('HAVE_GTK2') and bld.env.DEST_OS == 'win32': obj = bld(features = 'cxx cxxshlib', source = 'src/win_in_gtk2.cpp', |