diff options
author | David Robillard <d@drobilla.net> | 2011-02-23 07:33:14 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2011-02-23 07:33:14 +0000 |
commit | 4c3595e41c0e6955f667cbcfc43c0e9c3c99136e (patch) | |
tree | b5eaf9f4a3f8c6f1a81cfdd8b5bc9770af03c673 /wscript | |
parent | fcf7bfe09eb7d4b9a0445ae6f0ac2e933a260189 (diff) | |
download | suil-4c3595e41c0e6955f667cbcfc43c0e9c3c99136e.tar.gz suil-4c3595e41c0e6955f667cbcfc43c0e9c3c99136e.tar.bz2 suil-4c3595e41c0e6955f667cbcfc43c0e9c3c99136e.zip |
Support for wrapping Qt4 UIs for Gtk2 hosts and vice versa via modules.
Qt4 in Gtk2 is tested working (Float in Ingen).
Gtk2 in Qt4 is untested (and thus unlikely to work yet).
git-svn-id: http://svn.drobilla.net/lad/trunk/suil@3016 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'wscript')
-rw-r--r-- | wscript | 30 |
1 files changed, 30 insertions, 0 deletions
@@ -39,9 +39,24 @@ def configure(conf): autowaf.check_header(conf, 'lv2/lv2plug.in/ns/extensions/ui/ui.h') + autowaf.check_pkg(conf, 'gtk+-2.0', uselib_store='GTK2', + atleast_version='2.0.0', mandatory=False) + + autowaf.check_pkg(conf, 'QtGui', uselib_store='QT4', + atleast_version='4.0.0', mandatory=False) + autowaf.define(conf, 'SUIL_VERSION', SUIL_VERSION) + autowaf.define(conf, 'SUIL_MODULE_DIR', conf.env['LIBDIR'] + '/suil') + autowaf.define(conf, 'SUIL_DIR_SEP', '/') + autowaf.define(conf, 'SUIL_MODULE_EXT', '.so') conf.write_config_header('suil-config.h', remove=False) + autowaf.display_msg(conf, "Gtk2 Support", + bool(conf.env['HAVE_GTK2'])) + + autowaf.display_msg(conf, "Qt4 Support", + bool(conf.env['HAVE_QT4'])) + print def build(bld): @@ -62,6 +77,21 @@ def build(bld): obj.install_path = '${LIBDIR}' obj.cflags = [ '-fvisibility=hidden', '-DSUIL_SHARED', '-DSUIL_INTERNAL' ] + if bld.env['HAVE_GTK2'] and bld.env['HAVE_QT4']: + obj = bld(features = 'cxx cxxshlib') + obj.source = 'src/gtk2_in_qt4.cpp' + obj.target = 'suil_gtk2_in_qt4' + obj.install_path = '${LIBDIR}/suil' + obj.cflags = [ '-fvisibility=hidden', '-DSUIL_SHARED', '-DSUIL_INTERNAL' ] + autowaf.use_lib(bld, obj, 'GTK2 QT4') + + obj = bld(features = 'cxx cxxshlib') + obj.source = 'src/qt4_in_gtk2.cpp' + obj.target = 'suil_qt4_in_gtk2' + obj.install_path = '${LIBDIR}/suil' + obj.cflags = [ '-fvisibility=hidden', '-DSUIL_SHARED', '-DSUIL_INTERNAL' ] + autowaf.use_lib(bld, obj, 'GTK2 QT4') + # Documentation autowaf.build_dox(bld, 'SUIL', SUIL_VERSION, top, out) |