scons: fix bug that propagated libmapnik CXXFLAGS too liberally (in this case to plugins)

This commit is contained in:
Dane Springmeyer 2011-08-29 23:01:33 +00:00
parent 59460b07f9
commit 2c75feed65
3 changed files with 12 additions and 5 deletions

View file

@ -66,9 +66,6 @@ if env['PLATFORM'] == 'Darwin':
libraries.append('boost_regex%s' % env['BOOST_APPEND']) libraries.append('boost_regex%s' % env['BOOST_APPEND'])
if env['THREADING'] == 'multi': if env['THREADING'] == 'multi':
libraries.append('boost_thread%s' % env['BOOST_APPEND']) libraries.append('boost_thread%s' % env['BOOST_APPEND'])
if env['HAS_CAIRO']:
libraries.append('cairomm-1.0')
libraries.append('cairo')
##### Python linking on OS X is tricky ### ##### Python linking on OS X is tricky ###
# Confounding problems are: # Confounding problems are:
@ -173,6 +170,9 @@ py_env.Append(CPPPATH = env['PYTHON_INCLUDES'])
if env['HAS_CAIRO']: if env['HAS_CAIRO']:
py_env.Append(CPPPATH = env['CAIROMM_CPPPATHS']) py_env.Append(CPPPATH = env['CAIROMM_CPPPATHS'])
py_env.Append(CXXFLAGS = '-DHAVE_CAIRO')
if env['PLATFORM'] == 'Darwin':
py_env.Append(LIBS=env['CAIROMM_LINKFLAGS'])
if env['HAS_PYCAIRO']: if env['HAS_PYCAIRO']:
py_env.ParseConfig('pkg-config --cflags pycairo') py_env.ParseConfig('pkg-config --cflags pycairo')

View file

@ -32,8 +32,12 @@ source = Split(
demo_env = env.Clone() demo_env = env.Clone()
demo_env['CXXFLAGS'] = copy(env['LIBMAPNIK_CXXFLAGS']) demo_env['CXXFLAGS'] = copy(env['LIBMAPNIK_CXXFLAGS'])
demo_env.PrependUnique(CPPPATH=copy(env['CAIROMM_CPPPATHS']))
if env['HAS_CAIRO']:
demo_env.PrependUnique(CPPPATH=copy(env['CAIROMM_CPPPATHS']))
demo_env.Append(CXXFLAGS = '-DHAVE_CAIRO')
libraries = copy(env['LIBMAPNIK_LIBS']) libraries = copy(env['LIBMAPNIK_LIBS'])
boost_program_options = 'boost_program_options%s' % env['BOOST_APPEND'] boost_program_options = 'boost_program_options%s' % env['BOOST_APPEND']

View file

@ -44,7 +44,10 @@ if env['LINKING'] == 'static':
lib_env.Append(CXXFLAGS="-fPIC") lib_env.Append(CXXFLAGS="-fPIC")
mapnik_lib_link_flag = '' mapnik_lib_link_flag = ''
libmapnik_cxxflags = copy(lib_env['CXXFLAGS'])
# note: .data gets the actual list to allow a true copy
# and avoids unintended pollution of other environments
libmapnik_cxxflags = copy(lib_env['CXXFLAGS'].data)
ABI_VERSION = env['ABI_VERSION'] ABI_VERSION = env['ABI_VERSION']