source: trunk/avango-shade/SConscript @ 438

Revision 438, 4.2 KB checked in by rkuck, 2 years ago (diff)

Fixed include path (for users of case-sensitive file systems ...)

Line 
1# -*- Mode:Python -*-
2
3##########################################################################
4#                                                                        #
5# This file is part of AVANGO.                                           #
6#                                                                        #
7# Copyright 1997 - 2010 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
24import avango.build
25import os
26
27Alias('all', [Alias('shade-core'), Alias('shade')])
28Alias('check', Alias('check-shade'))
29Alias('install', Alias('install-shade'))
30Alias('check-shade', Alias('check-shade-core'))
31Alias('install-shade', Alias('install-shade-core'))
32
33#
34# Build core shade library
35#
36
37def append_shade_core_options(env):
38    env.Append(CPPPATH=Dir('core/include').abspath)
39    # The PREFIX_* settings allow us to move the shade library file inside the
40    # AVANGO installation directories. Note that the build recipes need to be
41    # adjusted accordingly.
42    shade_core_libname = "avangoShadeCore"
43    Export("shade_core_libname")
44    env['PREFIX_LIB'] = os.path.join(env['PREFIX'], 'lib')
45    env['PREFIX_SHADER_LIB'] = os.path.join(env['PREFIX_LIB'], 'avango/shade')
46    env['PREFIX_INCLUDE'] = os.path.join(env['PREFIX'], 'include/avango/shade/core')
47    avango.build.add_library(env, "boost_signals")
48    avango.build.add_library(env, "boost_filesystem")
49    avango.build.add_library(env, "osg")
50    env.Append(LIBS=['GLEW']) # TODO remove from AVANGO build
51
52shade_core_env = avango.build.Environment()
53append_shade_core_options(shade_core_env)
54Export('shade_core_env')
55
56shade_core_example_env = shade_core_env.Clone()
57Export('shade_core_example_env')
58
59shade_core_unittest_env = avango.build.TestEnvironment()
60append_shade_core_options(shade_core_unittest_env)
61shade_core_unittest_env.Append(CPPPATH=[Dir('../avango-unittest/include/avango/UnitTest++').abspath])
62Export('shade_core_unittest_env')
63
64SConscript('core/SConscript')
65
66avango.build.Environment.prepend_library_path(Dir('core').abspath)
67
68#
69# Build avango.shade
70#
71
72shade_env = avango.build.Environment()
73avango.build.add_library(shade_env, 'avango-core')
74avango.build.add_library(shade_env, 'avango-python')
75avango.build.add_library(shade_env, 'avango-osg')
76
77shade_env['SUBST'] = {
78    'PREFIX': avango.build.get_prefix().abspath,
79    'PKG_CONFIG_REQUIRES': 'avango-core,avango-python,avango-osg',
80    'AVANGO_SHADE_VERSION': '1.90.0',
81    'AVANGO_SHADE_VERSION_MAJOR': '1',
82    'AVANGO_SHADE_VERSION_MINOR': '90',
83    'AVANGO_SHADE_VERSION_MAINT': '0',
84    }
85
86avango_shade_pc = shade_env.Subst('dist/pkg-config/avango-shade.pc.in')
87Alias('shade', avango_shade_pc)
88shade_env.Alias('install-shade', shade_env.Install(avango.build.get_pkgconfig_path(), avango_shade_pc))
89
90config_h = shade_env.Subst('include/avango/shade/Config.h.in')
91Alias('shade', config_h)
92shade_env.Alias('install-shade', shade_env.Install(avango.build.get_include_path('avango/shade'), config_h))
93
94SConscript ([
95    'include/SConscript',
96    'src/avango/SConscript',
97    'src/tests/SConscript',
98    'python/SConscript',
99])
100
101avango.build.make_vcproject(shade_env, 'avango-shade', 'shade')
Note: See TracBrowser for help on using the repository browser.