fix python linking when using static libraries for deps or statically building libmapnik
This commit is contained in:
parent
9768052d97
commit
5cb6bbe01c
1 changed files with 6 additions and 15 deletions
|
@ -48,18 +48,13 @@ py_env.Append(CPPPATH = env['PYTHON_INCLUDES'])
|
||||||
|
|
||||||
py_env['LIBS'] = ['mapnik',env['BOOST_PYTHON_LIB']]
|
py_env['LIBS'] = ['mapnik',env['BOOST_PYTHON_LIB']]
|
||||||
|
|
||||||
|
link_all_libs = env['LINKING'] == 'static' or env['RUNTIME_LINK'] == 'static' or (env['PLATFORM'] == 'Darwin' and not env['PYTHON_DYNAMIC_LOOKUP'])
|
||||||
|
|
||||||
|
if link_all_libs:
|
||||||
|
py_env.AppendUnique(LIBS=env['LIBMAPNIK_LIBS'])
|
||||||
|
|
||||||
# TODO - do solaris/fedora need direct linking too?
|
# TODO - do solaris/fedora need direct linking too?
|
||||||
if env['PLATFORM'] == 'Darwin':
|
if env['PLATFORM'] == 'Darwin':
|
||||||
if not env['PYTHON_DYNAMIC_LOOKUP']:
|
|
||||||
if env['PNG']:
|
|
||||||
py_env.AppendUnique(LIBS = 'png')
|
|
||||||
if env['JPEG']:
|
|
||||||
py_env.AppendUnique(LIBS = 'jpeg')
|
|
||||||
py_env.AppendUnique(LIBS = env['ICU_LIB_NAME'])
|
|
||||||
py_env.AppendUnique(LIBS = 'boost_regex%s' % env['BOOST_APPEND'])
|
|
||||||
if env['THREADING'] == 'multi':
|
|
||||||
py_env.AppendUnique(LIBS = 'boost_thread%s' % env['BOOST_APPEND'])
|
|
||||||
|
|
||||||
##### Python linking on OS X is tricky ###
|
##### Python linking on OS X is tricky ###
|
||||||
# Confounding problems are:
|
# Confounding problems are:
|
||||||
# 1) likelyhood of multiple python installs of the same major.minor version
|
# 1) likelyhood of multiple python installs of the same major.minor version
|
||||||
|
@ -99,7 +94,6 @@ if env['PLATFORM'] == 'Darwin':
|
||||||
else:
|
else:
|
||||||
# should we fall back to -lpython here?
|
# should we fall back to -lpython here?
|
||||||
python_link_flag = '-F/ -framework Python'
|
python_link_flag = '-F/ -framework Python'
|
||||||
|
|
||||||
# if we are not linking to a framework then use the *nix standard approach
|
# if we are not linking to a framework then use the *nix standard approach
|
||||||
else:
|
else:
|
||||||
# TODO - do we need to pass -L/?
|
# TODO - do we need to pass -L/?
|
||||||
|
@ -118,9 +112,6 @@ if env['CUSTOM_LDFLAGS']:
|
||||||
else:
|
else:
|
||||||
linkflags = python_link_flag
|
linkflags = python_link_flag
|
||||||
|
|
||||||
if env['LINKING'] == 'static':
|
|
||||||
py_env.AppendUnique(LIBS=env['LIBMAPNIK_LIBS'])
|
|
||||||
|
|
||||||
paths = '''
|
paths = '''
|
||||||
"""Configuration paths of Mapnik fonts and input plugins (auto-generated by SCons)."""
|
"""Configuration paths of Mapnik fonts and input plugins (auto-generated by SCons)."""
|
||||||
|
|
||||||
|
@ -179,7 +170,7 @@ if 'uninstall' not in COMMAND_LINE_TARGETS:
|
||||||
if env['HAS_CAIRO']:
|
if env['HAS_CAIRO']:
|
||||||
py_env.Append(CPPPATH = env['CAIRO_CPPPATHS'])
|
py_env.Append(CPPPATH = env['CAIRO_CPPPATHS'])
|
||||||
py_env.Append(CPPDEFINES = '-DHAVE_CAIRO')
|
py_env.Append(CPPDEFINES = '-DHAVE_CAIRO')
|
||||||
if env['PLATFORM'] == 'Darwin' and not env['PYTHON_DYNAMIC_LOOKUP']:
|
if link_all_libs:
|
||||||
py_env.Append(LIBS=env['CAIRO_ALL_LIBS'])
|
py_env.Append(LIBS=env['CAIRO_ALL_LIBS'])
|
||||||
|
|
||||||
if env['HAS_PYCAIRO']:
|
if env['HAS_PYCAIRO']:
|
||||||
|
|
Loading…
Reference in a new issue