| 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 | # Avango is a trademark owned by FhG. # |
|---|
| 23 | # # |
|---|
| 24 | ########################################################################## |
|---|
| 25 | |
|---|
| 26 | import sys |
|---|
| 27 | import os, os.path |
|---|
| 28 | sys.path.insert(0, os.path.join(os.getcwd(), 'avango-build', 'src')) |
|---|
| 29 | |
|---|
| 30 | import avango.build |
|---|
| 31 | import avango.build.oshelper |
|---|
| 32 | |
|---|
| 33 | opts = avango.build.options |
|---|
| 34 | opts.AddOptions( |
|---|
| 35 | BoolOption('DISTRIBUTION_SUPPORT', |
|---|
| 36 | 'Switch to enable distribution support (requires ensemble module)', |
|---|
| 37 | False), |
|---|
| 38 | BoolOption('OPENSCENEGRAPH_SUPPORT', |
|---|
| 39 | 'Enable building OpenSceneGraph module', |
|---|
| 40 | True), |
|---|
| 41 | BoolOption('OPENSCENEGRAPH_DEBUG', |
|---|
| 42 | 'Use debug version of OpenSceneGraph library', |
|---|
| 43 | False), |
|---|
| 44 | BoolOption('OPENAL_SUPPORT', |
|---|
| 45 | 'Enable building OpenAL sound module', |
|---|
| 46 | False), |
|---|
| 47 | BoolOption('DISPLAY_SUPPORT', |
|---|
| 48 | 'Enable building display setup module (EXPERIMENTAL)', |
|---|
| 49 | False), |
|---|
| 50 | BoolOption('CONNECT_SUPPORT', |
|---|
| 51 | 'Enable building module to connect mobile devices to avango', |
|---|
| 52 | False), |
|---|
| 53 | BoolOption('CONNECT_CSHARP_SUPPORT', |
|---|
| 54 | 'Enable C# support for the connect module', |
|---|
| 55 | False), |
|---|
| 56 | BoolOption('VRPN_SUPPORT', |
|---|
| 57 | 'Enable VRPN support for the AvangoDaemon module', |
|---|
| 58 | False), |
|---|
| 59 | ) |
|---|
| 60 | |
|---|
| 61 | avango.build.setup() |
|---|
| 62 | |
|---|
| 63 | avango.build.set_config('avango-unittest', avango.build.PlainConfig(libraries = ['avangoUnitTest++'])) |
|---|
| 64 | avango.build.set_config('avango-core', avango.build.PlainConfig(libraries = ['avango'])) |
|---|
| 65 | |
|---|
| 66 | # avango.build.set_config('avango-osg', avango.build.PlainConfig(libraries = ['avangoOsg', 'avangoOsgParticle'])) |
|---|
| 67 | avango.build.set_config('avango-osg', avango.build.PlainConfig(libraries = ['avangoOsg'])) |
|---|
| 68 | avango.build.set_config('avango-osgparticle', avango.build.PlainConfig(libraries = ['avangoOsgParticle'])) |
|---|
| 69 | |
|---|
| 70 | avango.build.set_config('avango-osgviewer', avango.build.PlainConfig(libraries = ['avangoOsgViewer'])) |
|---|
| 71 | avango.build.set_config('avango-daemon', avango.build.PlainConfig(libraries = ['avangoDaemon'])) |
|---|
| 72 | |
|---|
| 73 | env = avango.build.Environment() |
|---|
| 74 | |
|---|
| 75 | if env['DISTRIBUTION_SUPPORT']: |
|---|
| 76 | avango.build.Environment.add_search_path('avango-ensemble') |
|---|
| 77 | if env['OPENSCENEGRAPH_DEBUG']: |
|---|
| 78 | avango.build.set_config_flag("OPENSCENEGRAPH_DEBUG", True) |
|---|
| 79 | |
|---|
| 80 | used_libs = Split(""" |
|---|
| 81 | dl |
|---|
| 82 | uuid |
|---|
| 83 | boost_thread |
|---|
| 84 | boost_signals |
|---|
| 85 | boost_python |
|---|
| 86 | osg |
|---|
| 87 | osgDB |
|---|
| 88 | osgViewer |
|---|
| 89 | osgParticle |
|---|
| 90 | osgText |
|---|
| 91 | """) |
|---|
| 92 | for lib in used_libs: |
|---|
| 93 | avango.build.Environment.add_search_path(lib) |
|---|
| 94 | |
|---|
| 95 | |
|---|
| 96 | avango.build.SConscript('avango-unittest/SConscript') |
|---|
| 97 | avango.build.TestEnvironment.add_library('avango-unittest') |
|---|
| 98 | |
|---|
| 99 | avango.build.SConscript('avango-build/SConscript') |
|---|
| 100 | avango.build.SConscript('avango-core/SConscript') |
|---|
| 101 | avango.build.SConscript('avango-python/SConscript') |
|---|
| 102 | if env['OPENSCENEGRAPH_SUPPORT']: |
|---|
| 103 | avango.build.SConscript('avango-osg/SConscript') |
|---|
| 104 | avango.build.SConscript('avango-moving/SConscript') |
|---|
| 105 | avango.build.SConscript('avango-menu/SConscript') |
|---|
| 106 | if not avango.build.oshelper.os_is_windows() and \ |
|---|
| 107 | not avango.build.oshelper.os_is_mac(): #FIXME get module running under Windows/MAC |
|---|
| 108 | avango.build.SConscript('avango-daemon/SConscript') |
|---|
| 109 | |
|---|
| 110 | if not avango.build.oshelper.os_is_windows() and \ |
|---|
| 111 | not avango.build.oshelper.os_is_mac(): #FIXME get module running under Windows/MAC |
|---|
| 112 | avango.build.SConscript('avango-sound/SConscript') |
|---|
| 113 | if env['OPENAL_SUPPORT']: |
|---|
| 114 | avango.build.SConscript('avango-openal/SConscript') |
|---|
| 115 | avango.build.SConscript('avango-tools/SConscript') |
|---|
| 116 | if env['DISPLAY_SUPPORT']: |
|---|
| 117 | avango.build.SConscript('avango-display/SConscript') |
|---|
| 118 | if env['CONNECT_SUPPORT']: |
|---|
| 119 | avango.build.SConscript('avango-connect/SConscript') |
|---|
| 120 | avango.build.SConscript('avango-inspector/SConscript') |
|---|
| 121 | avango.build.SConscript('avango-doc/SConscript') |
|---|
| 122 | avango.build.SConscript('examples/SConscript') |
|---|