X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=libs%2Faudiographer%2Fwscript;h=7ac9f8f4fa2593332b81e4ccfcc1edd6278574cc;hb=8fff1f290a5d3f457b734721a7afc63d5f8b3205;hp=de22a73a3712e3c9f2518c81c98c13d7a052cd60;hpb=4ffe8418e3d3e2b9835f37e96bc9521f48b6b774;p=ardour.git diff --git a/libs/audiographer/wscript b/libs/audiographer/wscript index de22a73a37..7ac9f8f4fa 100644 --- a/libs/audiographer/wscript +++ b/libs/audiographer/wscript @@ -36,6 +36,8 @@ def configure(conf): autowaf.check_pkg(conf, 'gthread-2.0', uselib_store='GTHREAD', atleast_version='2.14.0', mandatory=False) autowaf.check_pkg(conf, 'samplerate', uselib_store='SAMPLERATE', atleast_version='0.1.7', mandatory=False) autowaf.check_pkg(conf, 'sndfile', uselib_store='SNDFILE', atleast_version='1.0.18', mandatory=False) + autowaf.check_pkg(conf, 'fftw3f', uselib_store='FFTW3F', mandatory=True) + autowaf.check_pkg(conf, 'fftw3f', uselib_store='FFTW35F', atleast_version='3.3.5', mandatory=False) # Boost headers autowaf.check_header(conf, 'cxx', 'boost/shared_ptr.hpp') @@ -44,38 +46,50 @@ def configure(conf): 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.is_defined('HAVE_GLIB') and bld.is_defined('HAVE_GLIBMM') and bld.is_defined('HAVE_GTHREAD')) - audiographer = bld(features = 'cxx cxxshlib') - audiographer.source = ''' - private/gdither/gdither.cc - src/general/sample_format_converter.cc - src/routines.cc - src/debug_utils.cc - src/general/broadcast_info.cc - ''' - + if bld.is_defined('HAVE_FFTW35F') and bld.env['build_target'] != 'mingw': + bld.env['LIB_FFTW3F'] += ['fftw3f_threads'] + + audiographer_sources = [ + 'private/gdither/gdither.cc', + 'src/general/sample_format_converter.cc', + 'src/routines.cc', + 'src/debug_utils.cc', + 'src/general/analyser.cc', + 'src/general/broadcast_info.cc', + 'src/general/loudness_reader.cc', + 'src/general/normalizer.cc' + ] if bld.is_defined('HAVE_SAMPLERATE'): - audiographer.source += ''' - src/general/sr_converter.cc - ''' + audiographer_sources += [ 'src/general/sr_converter.cc' ] + + if bld.is_defined ('INTERNAL_SHARED_LIBS'): + audiographer = bld.shlib(features = 'c cxx cshlib cxxshlib', source=audiographer_sources) + # macros for this shared library + audiographer.defines = [ 'LIBAUDIOGRAPHER_DLL_EXPORTS=1' ] + else: + audiographer = bld.stlib(features = 'c cxx cstlib cxxstlib', source=audiographer_sources) + audiographer.cxxflags = [ '-fPIC' ] + audiographer.cflags = [ '-fPIC' ] + audiographer.defines = [] audiographer.name = 'libaudiographer' audiographer.target = 'audiographer' audiographer.export_includes = ['.', './src'] - audiographer.includes = ['.', './src'] - audiographer.uselib = 'GLIB GLIBMM GTHREAD SAMPLERATE SNDFILE' + audiographer.includes = ['.', './src','../ardour','../timecode','../evoral'] + audiographer.uselib = 'GLIB GLIBMM GTHREAD SAMPLERATE SNDFILE FFTW3F VAMPSDK VAMPHOSTSDK XML' audiographer.use = 'libpbd' audiographer.vnum = AUDIOGRAPHER_LIB_VERSION - audiographer.install_path = os.path.join(bld.env['LIBDIR'], 'ardour3') + audiographer.install_path = bld.env['LIBDIR'] if bld.env['BUILD_TESTS'] and bld.is_defined('HAVE_CPPUNIT'): @@ -95,7 +109,7 @@ 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 ''' @@ -111,7 +125,7 @@ def build(bld): ''' obj.use = 'libaudiographer' - obj.uselib = 'CPPUNIT GLIBMM' + obj.uselib = 'CPPUNIT GLIBMM SAMPLERATE SNDFILE FFTW3F VAMPSDK VAMPHOSTSDK' obj.target = 'run-tests' obj.install_path = ''