diff options
| author | Carl Hetherington <cth@carlh.net> | 2012-07-16 01:01:12 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2012-07-16 01:01:12 +0100 |
| commit | 3ebaa488a4388a5039803e26a64fa7b8ff1669e9 (patch) | |
| tree | 24d9268e0a6980cf1bb8cce06d93f88639d3bf2d | |
| parent | 11d57d48b64c6e174cb94b0a63150e9b91dd7942 (diff) | |
Move configure()s down to the appropriate level.
| -rw-r--r-- | src/gtk/wscript | 5 | ||||
| -rw-r--r-- | src/lib/wscript | 5 | ||||
| -rw-r--r-- | src/wscript | 5 | ||||
| -rw-r--r-- | test/wscript | 7 | ||||
| -rw-r--r-- | wscript | 15 |
5 files changed, 25 insertions, 12 deletions
diff --git a/src/gtk/wscript b/src/gtk/wscript index c68efea90..e5611b028 100644 --- a/src/gtk/wscript +++ b/src/gtk/wscript @@ -1,3 +1,8 @@ +def configure(conf): + conf.check_cfg(package = 'glib-2.0', args = '--cflags --libs', uselib_store = 'GLIB', mandatory = True) + conf.check_cfg(package = 'gtkmm-2.4', args = '--cflags --libs', uselib_store = 'GTKMM', mandatory = True) + conf.check_cfg(package = 'cairomm-1.0', args = '--cflags --libs', uselib_store = 'CAIROMM', mandatory = True) + def build(bld): obj = bld(features = 'cxx cxxshlib') obj.name = 'libdvdomatic-gtk' diff --git a/src/lib/wscript b/src/lib/wscript index ec5a723e4..f60a63f85 100644 --- a/src/lib/wscript +++ b/src/lib/wscript @@ -1,3 +1,8 @@ +def configure(conf): + if conf.options.debug_hash: + conf.env.append_value('CXXFLAGS', '-DDEBUG_HASH') + conf.check_cc(msg = 'Checking for library libmhash', function_name = 'mhash_init', header_name = 'mhash.h', lib = 'mhash', uselib_store = 'MHASH') + def build(bld): obj = bld(features = 'cxx cxxshlib') obj.name = 'libdvdomatic' diff --git a/src/wscript b/src/wscript index 9ae35d507..2ddd90f5c 100644 --- a/src/wscript +++ b/src/wscript @@ -1,3 +1,8 @@ +def configure(conf): + conf.recurse('lib') + if not conf.env.DISABLE_GUI: + conf.recurse('gtk') + def build(bld): bld.recurse('lib') bld.recurse('tools') diff --git a/test/wscript b/test/wscript index 7ea02a804..2869cd52c 100644 --- a/test/wscript +++ b/test/wscript @@ -1,3 +1,10 @@ +def configure(conf): + conf.check_cxx(fragment = """ + #define BOOST_TEST_MODULE Config test\n + #include <boost/test/unit_test.hpp>\n + int main() {} + """, msg = 'Checking for boost unit testing library', lib = 'boost_unit_test_framework', uselib_store = 'BOOST_TEST') + def build(bld): obj = bld(features = 'cxx cxxprogram') obj.name = 'short-unit-tests' @@ -14,9 +14,6 @@ def configure(conf): conf.env.append_value('CXXFLAGS', ['-DDVDOMATIC_VERSION="%s"' % VERSION]) conf.env.DEBUG_HASH = conf.options.debug_hash - if conf.options.debug_hash: - conf.env.append_value('CXXFLAGS', '-DDEBUG_HASH') - conf.check_cc(msg = 'Checking for library libmhash', function_name = 'mhash_init', header_name = 'mhash.h', lib = 'mhash', uselib_store = 'MHASH') if conf.options.enable_debug: conf.env.append_value('CXXFLAGS', '-g') @@ -24,10 +21,6 @@ def configure(conf): conf.env.append_value('CXXFLAGS', '-O3') conf.env.DISABLE_GUI = conf.options.disable_gui - if conf.options.disable_gui is False: - conf.check_cfg(package = 'glib-2.0', args = '--cflags --libs', uselib_store = 'GLIB', mandatory = True) - conf.check_cfg(package = 'gtkmm-2.4', args = '--cflags --libs', uselib_store = 'GTKMM', mandatory = True) - conf.check_cfg(package = 'cairomm-1.0', args = '--cflags --libs', uselib_store = 'CAIROMM', mandatory = True) conf.check_cfg(package = 'sigc++-2.0', args = '--cflags --libs', uselib_store = 'SIGC++', mandatory = True) conf.check_cfg(package = 'libavformat', args = '--cflags --libs', uselib_store = 'AVFORMAT', mandatory = True) @@ -65,11 +58,9 @@ def configure(conf): #include <boost/filesystem.hpp>\n int main() { boost::filesystem::copy_file ("a", "b"); }\n """, msg = 'Checking for boost filesystem library', libpath = '/usr/local/lib', lib = ['boost_filesystem', 'boost_system'], uselib_store = 'BOOST_FILESYSTEM') - conf.check_cxx(fragment = """ - #define BOOST_TEST_MODULE Config test\n - #include <boost/test/unit_test.hpp>\n - int main() {} - """, msg = 'Checking for boost unit testing library', lib = 'boost_unit_test_framework', uselib_store = 'BOOST_TEST') + + conf.recurse('src') + conf.recurse('test') def build(bld): bld.recurse('src') |
