| 1 | # -*- Mode:Python -*- |
|---|
| 2 | |
|---|
| 3 | ########################################################################## |
|---|
| 4 | # # |
|---|
| 5 | # This file is part of AVANGO. # |
|---|
| 6 | # # |
|---|
| 7 | # Copyright 1997 - 2009 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 | from avango.build.oshelper import * |
|---|
| 26 | |
|---|
| 27 | avango.build.Environment.prepend_include_path(Dir('include').abspath) |
|---|
| 28 | osg_env = avango.build.Environment() |
|---|
| 29 | avango.build.add_library(osg_env, 'avango-core') |
|---|
| 30 | |
|---|
| 31 | Alias('all', Alias('osg')) |
|---|
| 32 | Alias('check', Alias('check-osg')) |
|---|
| 33 | Alias('install', Alias('install-osg')) |
|---|
| 34 | |
|---|
| 35 | # Check for distribution support |
|---|
| 36 | |
|---|
| 37 | distlib = '' |
|---|
| 38 | if osg_env['DISTRIBUTION_SUPPORT']: |
|---|
| 39 | distlib = '-lavangoOsgNetwork' |
|---|
| 40 | osg_env['SUBST'] = { |
|---|
| 41 | 'PREFIX': avango.build.get_prefix().abspath, |
|---|
| 42 | 'AVANGO_OSG_DEBUG': int(osg_env['DEBUG']), |
|---|
| 43 | 'AVANGO_DISTRIBUTION_SUPPORT': osg_env.get("do_distribution", False), |
|---|
| 44 | 'PKG_CONFIG_REQUIRES': 'avango-core', |
|---|
| 45 | 'AVANGO_OSG_VERSION': '1.90.0', |
|---|
| 46 | 'AVANGO_OSG_VERSION_MAJOR': '1', |
|---|
| 47 | 'AVANGO_OSG_VERSION_MINOR': '90', |
|---|
| 48 | 'AVANGO_OSG_VERSION_MAINT': '0', |
|---|
| 49 | 'AVANGO_OSG_DISTRIBUTION_LIB': distlib, |
|---|
| 50 | } |
|---|
| 51 | |
|---|
| 52 | avango_osg_pc = osg_env.Subst('dist/pkg-config/avango-osg.pc.in') |
|---|
| 53 | Alias('osg', avango_osg_pc) |
|---|
| 54 | osg_env.Alias('install-osg', osg_env.Install(avango.build.get_pkgconfig_path(), avango_osg_pc)) |
|---|
| 55 | |
|---|
| 56 | avango_osgviewer_pc = osg_env.Subst('dist/pkg-config/avango-osgviewer.pc.in') |
|---|
| 57 | Alias('osg', avango_osgviewer_pc) |
|---|
| 58 | osg_env.Alias('install-osg', osg_env.Install(avango.build.get_pkgconfig_path(), avango_osgviewer_pc)) |
|---|
| 59 | |
|---|
| 60 | config_h = osg_env.Subst('include/avango/osg/Config.h.in') |
|---|
| 61 | Alias('osg', config_h) |
|---|
| 62 | osg_env.Alias('install-osg', osg_env.Install(avango.build.get_include_path('avango/osg'), config_h)) |
|---|
| 63 | |
|---|
| 64 | for lib in ['osg', 'osgDB', 'osgViewer', 'osgParticle', 'osgText', 'osgUtil', 'GL', 'GLU']: |
|---|
| 65 | avango.build.add_library(osg_env, lib) |
|---|
| 66 | |
|---|
| 67 | Export('osg_env') |
|---|
| 68 | |
|---|
| 69 | SConscript ([ |
|---|
| 70 | 'include/avango/osg/SConscript', |
|---|
| 71 | 'include/avango/osg/network/SConscript', |
|---|
| 72 | 'include/avango/osg/particle/SConscript', |
|---|
| 73 | 'include/avango/osg/viewer/SConscript', |
|---|
| 74 | 'src/avango/osg/SConscript', |
|---|
| 75 | 'src/avango/osg/network/SConscript', |
|---|
| 76 | 'src/avango/osg/network/tests/SConscript', |
|---|
| 77 | 'src/avango/osg/particle/SConscript', |
|---|
| 78 | 'src/avango/osg/tests/SConscript', |
|---|
| 79 | 'src/avango/osg/viewer/SConscript', |
|---|
| 80 | 'python/SConscript', |
|---|
| 81 | ]) |
|---|
| 82 | |
|---|
| 83 | avango.build.make_vcproject(osg_env, 'avango-osg', 'osg') |
|---|