| 1 | # -*- Mode:Python -*- |
|---|
| 2 | |
|---|
| 3 | ########################################################################## |
|---|
| 4 | # # |
|---|
| 5 | # This file is part of AVANGO. # |
|---|
| 6 | # # |
|---|
| 7 | # Copyright 1997 - 2008 Fraunhofer-Gesellschaft zur Foerderung der # |
|---|
| 8 | # angewandten Forschung (FhG), Munich, Germany. # |
|---|
| 9 | # # |
|---|
| 10 | # AVANGO is free software: you can redistribute it and/or modify # |
|---|
| 11 | # it under the terms of the GNU Lesser General Public License as # |
|---|
| 12 | # published by the Free Software Foundation, version 3. # |
|---|
| 13 | # # |
|---|
| 14 | # AVANGO is distributed in the hope that it will be useful, # |
|---|
| 15 | # but WITHOUT ANY WARRANTY; without even the implied warranty of # |
|---|
| 16 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # |
|---|
| 17 | # GNU General Public License for more details. # |
|---|
| 18 | # # |
|---|
| 19 | # You should have received a copy of the GNU Lesser General Public # |
|---|
| 20 | # License along with AVANGO. If not, see <http://www.gnu.org/licenses/>. # |
|---|
| 21 | # # |
|---|
| 22 | ########################################################################## |
|---|
| 23 | |
|---|
| 24 | import avango.build |
|---|
| 25 | |
|---|
| 26 | avango.build.Environment.prepend_include_path(Dir('include').abspath) |
|---|
| 27 | avango.build.Environment.prepend_library_path(Dir('.').abspath) |
|---|
| 28 | local_env = avango.build.Environment() |
|---|
| 29 | avango.build.add_library(local_env, 'avango-core') |
|---|
| 30 | avango.build.add_library(local_env, 'avango-osg') |
|---|
| 31 | |
|---|
| 32 | # Substitutions |
|---|
| 33 | local_env['SUBST'] = { |
|---|
| 34 | 'PREFIX': avango.build.get_prefix().abspath, |
|---|
| 35 | 'AVANGO_SOUND_DEBUG': int(local_env['DEBUG']), |
|---|
| 36 | 'AVANGO_SOUND_OSG_SUPPORT': int(local_env['OPENSCENEGRAPH_SUPPORT']), |
|---|
| 37 | 'PKG_CONFIG_REQUIRES': 'avango-core, avango-osg', |
|---|
| 38 | 'AVANGO_SOUND_VERSION': '1.90.0', |
|---|
| 39 | 'AVANGO_SOUND_VERSION_MAJOR': '1', |
|---|
| 40 | 'AVANGO_SOUND_VERSION_MINOR': '90', |
|---|
| 41 | 'AVANGO_SOUND_VERSION_MAINT': '0', |
|---|
| 42 | } |
|---|
| 43 | |
|---|
| 44 | avango_sound_pc = local_env.Subst('dist/pkg-config/avango-sound.pc.in') |
|---|
| 45 | Alias('sound', avango_sound_pc) |
|---|
| 46 | Alias('install-sound', local_env.Install(avango.build.get_pkgconfig_path(), avango_sound_pc)) |
|---|
| 47 | |
|---|
| 48 | config_h = local_env.Subst('include/avango/sound/Config.h.in') |
|---|
| 49 | Alias('sound', config_h) |
|---|
| 50 | Alias('install-sound', local_env.Install(avango.build.get_include_path('avango/sound'), config_h)) |
|---|
| 51 | |
|---|
| 52 | sound_files = Split(''' |
|---|
| 53 | src/SoundTraverser.cpp |
|---|
| 54 | src/SoundSource.cpp |
|---|
| 55 | src/SoundRenderer.cpp |
|---|
| 56 | src/SampleBuffer.cpp |
|---|
| 57 | ''') |
|---|
| 58 | sound_lib = local_env.SharedLibrary('avangoSound', sound_files) |
|---|
| 59 | Alias('install-sound', local_env.Install(avango.build.get_library_path(), sound_lib)) |
|---|
| 60 | |
|---|
| 61 | local_test_env = avango.build.TestEnvironment() |
|---|
| 62 | local_test_env.Append(LIBS=[sound_lib]) |
|---|
| 63 | |
|---|
| 64 | Alias('sound', sound_lib) |
|---|
| 65 | Alias('all', Alias('sound')) |
|---|
| 66 | Alias('check', Alias("check-sound")) |
|---|
| 67 | Alias('install', Alias('install-sound')) |
|---|
| 68 | |
|---|
| 69 | |
|---|
| 70 | SConscript ([ |
|---|
| 71 | 'include/avango/sound/SConscript', |
|---|
| 72 | 'src/tests/SConscript', |
|---|
| 73 | 'python/SConscript' |
|---|
| 74 | ]) |
|---|