X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;ds=sidebyside;f=libs%2Faudiographer%2Fwscript;h=66f4e80b724171c39e564617b259cb2497eebe77;hb=ff7785142de6fb8fa57e3334f76195122fad111b;hp=31103b3095192afeb1a6fe20d7806000e609084a;hpb=4769db412dffcee699116a63fc714f88513fa0c6;p=ardour.git diff --git a/libs/audiographer/wscript b/libs/audiographer/wscript index 31103b3095..66f4e80b72 100644 --- a/libs/audiographer/wscript +++ b/libs/audiographer/wscript @@ -1,6 +1,6 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- -import autowaf +from waflib.extras import autowaf as autowaf import os # Version of this package (even if built as a child) @@ -19,17 +19,16 @@ APPNAME = 'audiographer' VERSION = AUDIOGRAPHER_VERSION # Mandatory variables -srcdir = '.' -blddir = 'build' +top = '.' +out = 'build' -def set_options(opt): +def options(opt): autowaf.set_options(opt) def configure(conf): + conf.load('compiler_cxx') autowaf.configure(conf) - conf.check_tool('compiler_cxx') - autowaf.check_pkg(conf, 'cppunit', uselib_store='CPPUNIT', atleast_version='1.12.0', mandatory=False) autowaf.check_pkg(conf, 'sigc++-2.0', uselib_store='SIGCPP', atleast_version='2.0', mandatory=False) autowaf.check_pkg(conf, 'glib-2.0', uselib_store='GLIB', atleast_version='2.2', mandatory=False) @@ -39,21 +38,23 @@ def configure(conf): autowaf.check_pkg(conf, 'sndfile', uselib_store='SNDFILE', atleast_version='1.0.18', mandatory=False) # Boost headers - autowaf.check_header(conf, 'boost/shared_ptr.hpp') - autowaf.check_header(conf, 'boost/format.hpp') + autowaf.check_header(conf, 'cxx', 'boost/shared_ptr.hpp') + autowaf.check_header(conf, 'cxx', 'boost/format.hpp') def build(bld): # Headers - #bld.install_files('${INCLUDEDIR}/audiographer', 'audiographer/*.h') - #bld.install_files('${INCLUDEDIR}/audiographer/general', 'audiographer/general/*.h') - #bld.install_files('${INCLUDEDIR}/audiographer/sndfile', 'audiographer/sndfile/*.h') - #bld.install_files('${INCLUDEDIR}/audiographer/utils', 'audiographer/utils/*.h') + #bld.install_files('${INCLUDEDIR}/audiographer', bld.path.ant_glob('audiographer/*.h')) + #bld.install_files('${INCLUDEDIR}/audiographer/general', bld.path.ant_glob('audiographer/general/*.h')) + #bld.install_files('${INCLUDEDIR}/audiographer/sndfile', bld.path.ant_glob('audiographer/sndfile/*.h')) + #bld.install_files('${INCLUDEDIR}/audiographer/utils', bld.path.ant_glob('audiographer/utils/*.h')) #bld.env['BUILD_TESTS'] = True - bld.env['HAVE_ALL_GTHREAD'] = bld.env['HAVE_GLIB'] and bld.env['HAVE_GLIBMM'] and bld.env['HAVE_GTHREAD'] + bld.env['HAVE_ALL_GTHREAD'] = (bld.is_defined('HAVE_GLIB') + and bld.is_defined('HAVE_GLIBMM') + and bld.is_defined('HAVE_GTHREAD')) - audiographer = bld.new_task_gen('cxx', 'shlib') + audiographer = bld(features = 'cxx cxxshlib') audiographer.source = ''' private/gdither/gdither.cc src/general/sample_format_converter.cc @@ -62,24 +63,24 @@ def build(bld): src/general/broadcast_info.cc ''' - if bld.env['HAVE_SAMPLERATE']: + if bld.is_defined('HAVE_SAMPLERATE'): audiographer.source += ''' src/general/sr_converter.cc ''' audiographer.name = 'libaudiographer' audiographer.target = 'audiographer' - audiographer.export_incdirs = ['.', './src'] + audiographer.export_includes = ['.', './src'] audiographer.includes = ['.', './src'] audiographer.uselib = 'GLIB GLIBMM GTHREAD SAMPLERATE SNDFILE' - audiographer.uselib_local = 'libpbd' + audiographer.use = 'libpbd' audiographer.vnum = AUDIOGRAPHER_LIB_VERSION audiographer.install_path = os.path.join(bld.env['LIBDIR'], 'ardour3') - if bld.env['BUILD_TESTS'] and bld.env['HAVE_CPPUNIT']: + if bld.env['BUILD_TESTS'] and bld.is_defined('HAVE_CPPUNIT'): # Unit tests - obj = bld.new_task_gen('cxx', 'program') + obj = bld(features = 'cxx cxxprogram') obj.source = ''' tests/test_runner.cc tests/type_utils_test.cc @@ -94,22 +95,22 @@ def build(bld): tests/general/silence_trimmer_test.cc ''' - if bld.env['HAVE_ALL_GTHREAD']: + if bld.is_defined('HAVE_ALL_GTHREAD'): obj.source += ''' tests/general/threader_test.cc ''' - if bld.env['HAVE_SNDFILE']: + if bld.is_defined('HAVE_SNDFILE'): obj.source += ''' tests/sndfile/tmp_file_test.cc ''' - if bld.env['HAVE_SAMPLERATE']: + if bld.is_defined('HAVE_SAMPLERATE'): obj.source += ''' tests/general/sr_converter_test.cc ''' - obj.uselib_local = 'libaudiographer' + obj.use = 'libaudiographer' obj.uselib = 'CPPUNIT GLIBMM' obj.target = 'run-tests' obj.install_path = ''