diff --git a/SConstruct b/SConstruct index 5242ae558..ef07cb984 100644 --- a/SConstruct +++ b/SConstruct @@ -450,6 +450,7 @@ pickle_store = [# Scons internal variables 'HAS_CAIRO', 'MAPNIK_HAS_DLFCN', 'HAS_PYCAIRO', + 'PYCAIRO_PATHS', 'HAS_LIBXML2', 'PYTHON_IS_64BIT', 'SAMPLE_INPUT_PLUGINS', @@ -1094,6 +1095,7 @@ if not preconfigured: env['CAIRO_ALL_LIBS'] = [] env['CAIRO_CPPPATHS'] = [] env['HAS_PYCAIRO'] = False + env['PYCAIRO_PATHS'] = [] env['HAS_LIBXML2'] = False env['LIBMAPNIK_LIBS'] = [] env['LIBMAPNIK_LINKFLAGS'] = [] @@ -1660,6 +1662,13 @@ if not preconfigured: if env['CAIRO']: if CHECK_PKG_CONFIG and conf.CheckPKG('pycairo'): env['HAS_PYCAIRO'] = True + temp_env = env.Clone() + temp_env['CPPPATH'] = [] + temp_env.ParseConfig('pkg-config --cflags pycairo') + if temp_env['CPPPATH']: + env['PYCAIRO_PATHS'] = copy(temp_env['CPPPATH']) + else: + print temp_env['CPPPATH'] else: env['SKIPPED_DEPS'].extend(['pycairo']) else: diff --git a/bindings/python/build.py b/bindings/python/build.py index 940c255d2..db92a51f3 100644 --- a/bindings/python/build.py +++ b/bindings/python/build.py @@ -45,6 +45,7 @@ target_path = os.path.normpath(env['PYTHON_INSTALL_LOCATION'] + os.path.sep + en target_path_deprecated = os.path.normpath(env['PYTHON_INSTALL_LOCATION'] + os.path.sep + 'mapnik2') py_env = env.Clone() + py_env.Append(CPPPATH = env['PYTHON_INCLUDES']) py_env.Append(CPPDEFINES = env['LIBMAPNIK_DEFINES']) @@ -180,8 +181,8 @@ if 'uninstall' not in COMMAND_LINE_TARGETS: py_env.Append(LIBS=env['CAIRO_ALL_LIBS']) if env['HAS_PYCAIRO']: - py_env.ParseConfig('pkg-config --cflags pycairo') py_env.Append(CPPDEFINES = '-DHAVE_PYCAIRO') + py_env.Append(CPPPATH = env['PYCAIRO_PATHS']) py_env.Append(LINKFLAGS=python_link_flag) py_env.AppendUnique(LIBS='mapnik-json')