move bundled agg sources into depedencies subdirectory (as we may bundle other deps there too to reduce clutter) and remove all traces of unused tinyxml (ptree now uses rapidxml header-only library internally) - refs #913
This commit is contained in:
parent
28ed3e5fdf
commit
285591f370
2 changed files with 13 additions and 23 deletions
19
SConstruct
19
SConstruct
|
@ -381,7 +381,7 @@ opts.AddVariables(
|
||||||
BoolVariable('FULL_LIB_PATH', 'Use the full path for the libmapnik.dylib "install_name" when linking on Mac OS X', 'True'),
|
BoolVariable('FULL_LIB_PATH', 'Use the full path for the libmapnik.dylib "install_name" when linking on Mac OS X', 'True'),
|
||||||
ListVariable('BINDINGS','Language bindings to build','all',['python']),
|
ListVariable('BINDINGS','Language bindings to build','all',['python']),
|
||||||
EnumVariable('THREADING','Set threading support','multi', ['multi','single']),
|
EnumVariable('THREADING','Set threading support','multi', ['multi','single']),
|
||||||
EnumVariable('XMLPARSER','Set xml parser ','libxml2', ['tinyxml','spirit','libxml2']),
|
EnumVariable('XMLPARSER','Set xml parser','libxml2', ['libxml2','ptree']),
|
||||||
('JOBS', 'Set the number of parallel compilations', "1", lambda key, value, env: int(value), int),
|
('JOBS', 'Set the number of parallel compilations', "1", lambda key, value, env: int(value), int),
|
||||||
BoolVariable('DEMO', 'Compile demo c++ application', 'False'),
|
BoolVariable('DEMO', 'Compile demo c++ application', 'False'),
|
||||||
BoolVariable('PGSQL2SQLITE', 'Compile and install a utility to convert postgres tables to sqlite', 'False'),
|
BoolVariable('PGSQL2SQLITE', 'Compile and install a utility to convert postgres tables to sqlite', 'False'),
|
||||||
|
@ -1072,7 +1072,6 @@ if not preconfigured:
|
||||||
env.AppendUnique(CPPPATH = os.path.realpath(inc_path))
|
env.AppendUnique(CPPPATH = os.path.realpath(inc_path))
|
||||||
env.AppendUnique(LIBPATH = os.path.realpath(lib_path))
|
env.AppendUnique(LIBPATH = os.path.realpath(lib_path))
|
||||||
|
|
||||||
|
|
||||||
conf.parse_config('FREETYPE_CONFIG')
|
conf.parse_config('FREETYPE_CONFIG')
|
||||||
|
|
||||||
# check if freetype links to bz2
|
# check if freetype links to bz2
|
||||||
|
@ -1083,12 +1082,10 @@ if not preconfigured:
|
||||||
if 'bz2' in temp_env['LIBS']:
|
if 'bz2' in temp_env['LIBS']:
|
||||||
env['EXTRA_FREETYPE_LIBS'].append('bz2')
|
env['EXTRA_FREETYPE_LIBS'].append('bz2')
|
||||||
|
|
||||||
if env['XMLPARSER'] == 'tinyxml':
|
# libxml2 should be optional but is currently not
|
||||||
env['CPPPATH'].append('#tinyxml')
|
# https://github.com/mapnik/mapnik/issues/913
|
||||||
env.Append(CXXFLAGS = '-DBOOST_PROPERTY_TREE_XML_PARSER_TINYXML -DTIXML_USE_STL')
|
if conf.parse_config('XML2_CONFIG'):
|
||||||
elif env['XMLPARSER'] == 'libxml2':
|
env['HAS_LIBXML2'] = True
|
||||||
if conf.parse_config('XML2_CONFIG'):
|
|
||||||
env['HAS_LIBXML2'] = True
|
|
||||||
|
|
||||||
LIBSHEADERS = [
|
LIBSHEADERS = [
|
||||||
['m', 'math.h', True,'C'],
|
['m', 'math.h', True,'C'],
|
||||||
|
@ -1252,8 +1249,8 @@ if not preconfigured:
|
||||||
# we link locally
|
# we link locally
|
||||||
|
|
||||||
if env['INTERNAL_LIBAGG']:
|
if env['INTERNAL_LIBAGG']:
|
||||||
env.Prepend(CPPPATH = '#agg/include')
|
env.Prepend(CPPPATH = '#deps/agg/include')
|
||||||
env.Prepend(LIBPATH = '#agg')
|
env.Prepend(LIBPATH = '#deps/agg')
|
||||||
else:
|
else:
|
||||||
env.ParseConfig('pkg-config --libs --cflags libagg')
|
env.ParseConfig('pkg-config --libs --cflags libagg')
|
||||||
|
|
||||||
|
@ -1596,7 +1593,7 @@ if not HELP_REQUESTED:
|
||||||
|
|
||||||
# Build agg first, doesn't need anything special
|
# Build agg first, doesn't need anything special
|
||||||
if env['RUNTIME_LINK'] == 'shared' and env['INTERNAL_LIBAGG']:
|
if env['RUNTIME_LINK'] == 'shared' and env['INTERNAL_LIBAGG']:
|
||||||
SConscript('agg/build.py')
|
SConscript('deps/agg/build.py')
|
||||||
|
|
||||||
# Build the core library
|
# Build the core library
|
||||||
SConscript('src/build.py')
|
SConscript('src/build.py')
|
||||||
|
|
17
src/build.py
17
src/build.py
|
@ -60,8 +60,9 @@ lib_env['LIBS'] = ['freetype','ltdl','png','tiff','z','jpeg','proj',env['ICU_LIB
|
||||||
if len(env['EXTRA_FREETYPE_LIBS']):
|
if len(env['EXTRA_FREETYPE_LIBS']):
|
||||||
lib_env['LIBS'].extend(copy(env['EXTRA_FREETYPE_LIBS']))
|
lib_env['LIBS'].extend(copy(env['EXTRA_FREETYPE_LIBS']))
|
||||||
|
|
||||||
if env['XMLPARSER'] == 'libxml2':
|
# libxml2 should be optional but is currently not
|
||||||
lib_env['LIBS'].append('xml2')
|
# https://github.com/mapnik/mapnik/issues/913
|
||||||
|
lib_env['LIBS'].append('xml2')
|
||||||
|
|
||||||
if env['THREADING'] == 'multi':
|
if env['THREADING'] == 'multi':
|
||||||
lib_env['LIBS'].append('boost_thread%s' % env['BOOST_APPEND'])
|
lib_env['LIBS'].append('boost_thread%s' % env['BOOST_APPEND'])
|
||||||
|
@ -228,7 +229,7 @@ source += Split(
|
||||||
)
|
)
|
||||||
|
|
||||||
if env['RUNTIME_LINK'] == "static":
|
if env['RUNTIME_LINK'] == "static":
|
||||||
source += glob.glob('../agg/src/' + '*.cpp')
|
source += glob.glob('../deps/agg/src/' + '*.cpp')
|
||||||
|
|
||||||
# grid backend
|
# grid backend
|
||||||
source += Split(
|
source += Split(
|
||||||
|
@ -269,15 +270,7 @@ if env['SVG_RENDERER']: # svg backend
|
||||||
lib_env.Append(CXXFLAGS = '-DSVG_RENDERER')
|
lib_env.Append(CXXFLAGS = '-DSVG_RENDERER')
|
||||||
libmapnik_cxxflags.append('-DSVG_RENDERER')
|
libmapnik_cxxflags.append('-DSVG_RENDERER')
|
||||||
|
|
||||||
if env['XMLPARSER'] == 'tinyxml':
|
if env['XMLPARSER'] == 'libxml2' and env['HAS_LIBXML2']:
|
||||||
source += Split(
|
|
||||||
"""
|
|
||||||
../tinyxml/tinystr.cpp
|
|
||||||
../tinyxml/tinyxml.cpp
|
|
||||||
../tinyxml/tinyxmlerror.cpp
|
|
||||||
../tinyxml/tinyxmlparser.cpp
|
|
||||||
""")
|
|
||||||
elif env['XMLPARSER'] == 'libxml2' and env['HAS_LIBXML2']:
|
|
||||||
source += Split(
|
source += Split(
|
||||||
"""
|
"""
|
||||||
libxml2_loader.cpp
|
libxml2_loader.cpp
|
||||||
|
|
Loading…
Reference in a new issue