OLD | NEW |
1 # Copyright (c) 2009 The Chromium OS Authors. All rights reserved. | 1 # Copyright (c) 2009 The Chromium OS Authors. All rights reserved. |
2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
4 | 4 |
5 import os | 5 import os |
6 | 6 |
7 SOURCES=['theme_draw.cc', 'theme_main.cc'] | 7 SOURCES=['theme_draw.cc', 'theme_main.cc'] |
8 | 8 |
9 env = Environment( | 9 env = Environment( |
10 CPPPATH=[ '..' ], | 10 CPPPATH=[ '..' ], |
11 CCFLAGS=['-fno-exceptions', '-Wall'], | 11 CCFLAGS=['-fno-exceptions', '-Wall'], |
12 CXXFLAGS=['-fPIC'], | 12 CXXFLAGS=['-fPIC'], |
13 ) | 13 ) |
14 | 14 |
15 for key in Split('CC CXX AR RANLIB LD NM CFLAGS CCFLAGS'): | 15 for key in Split('CC CXX AR RANLIB LD NM CFLAGS CCFLAGS'): |
16 value = os.environ.get(key) | 16 value = os.environ.get(key) |
17 if value != None: | 17 if value != None: |
18 env[key] = value | 18 env[key] = value |
19 | 19 |
| 20 # Fix up the pkg-config path if it is present in the environment. |
| 21 for key in Split('PKG_CONFIG_LIBDIR PKG_CONFIG_PATH'): |
| 22 if os.environ.has_key(key): |
| 23 env['ENV'][key] = os.environ[key] |
| 24 |
20 env.ParseConfig('pkg-config --cflags --libs gtk+-2.0 glib-2.0') | 25 env.ParseConfig('pkg-config --cflags --libs gtk+-2.0 glib-2.0') |
21 | 26 |
22 env.SharedLibrary('theme', SOURCES) | 27 env.SharedLibrary('theme', SOURCES) |
OLD | NEW |