cleanup+update build scripts

This commit is contained in:
Artem Pavlenko 2018-03-14 15:46:25 +01:00
parent acf3f7c3b3
commit 1242df28ee
7 changed files with 8 additions and 19 deletions

View file

@ -36,18 +36,15 @@ demo_env = env.Clone()
demo_env['CXXFLAGS'] = copy(env['LIBMAPNIK_CXXFLAGS'])
demo_env.Append(CPPDEFINES = env['LIBMAPNIK_DEFINES'])
demo_env['LINKFLAGS'] = '-lmapnik -lmapnik-json' + demo_env['LINKFLAGS']
print demo_env['LINKFLAGS']
demo_env['LINKFLAGS'] = '-l%s -lmapnik-json ' % env['MAPNIK_NAME'] + demo_env['LINKFLAGS']
if env['HAS_CAIRO']:
demo_env.PrependUnique(CPPPATH=env['CAIRO_CPPPATHS'])
demo_env.Append(CPPDEFINES = '-DHAVE_CAIRO')
libraries = []#env['MAPNIK_NAME']]
libraries = []
libraries.extend(copy(env['LIBMAPNIK_LIBS']))
print libraries
rundemo = demo_env.Program('rundemo', source, LIBS=libraries)
Depends(rundemo, env.subst('../../src/%s' % env['MAPNIK_LIB_NAME']))
# build locally if installing

View file

@ -54,9 +54,7 @@ else:
if env['PLUGIN_LINKING'] == 'shared':
libraries.append('boost_system%s' % env['BOOST_APPEND'])
#libraries.insert(0,env['MAPNIK_NAME'])
libraries.append(env['ICU_LIB_NAME'])
TARGET = plugin_env.SharedLibrary('../%s' % PLUGIN_NAME,
SHLIBPREFIX='',
SHLIBSUFFIX='.input',

View file

@ -52,7 +52,6 @@ libraries = copy(plugin_env['LIBS'])
if env['PLUGIN_LINKING'] == 'shared':
libraries.append('boost_system%s' % env['BOOST_APPEND'])
libraries.insert(0,env['MAPNIK_NAME'])
libraries.append(env['ICU_LIB_NAME'])
TARGET = plugin_env.SharedLibrary('../%s' % PLUGIN_NAME,
SHLIBPREFIX='',

View file

@ -48,7 +48,6 @@ plugin_env.Append(CPPDEFINES=cppdefines)
if env['PLUGIN_LINKING'] == 'shared':
libraries.append('boost_system%s' % env['BOOST_APPEND'])
libraries.insert(0,env['MAPNIK_NAME'])
libraries.append(env['ICU_LIB_NAME'])
TARGET = plugin_env.SharedLibrary('../shape',

View file

@ -37,7 +37,7 @@ plugin_sources = Split(
libraries = [ 'sqlite3' ]
linkflags = []
plugin_env.Append(LINKFLAGS='-lmapnik')
if env['SQLITE_LINKFLAGS']:
linkflags.append(env['SQLITE_LINKFLAGS'])
plugin_env.Append(LINKFLAGS=linkflags)

View file

@ -5,10 +5,8 @@ from copy import copy
Import ('env')
test_env = env.Clone()
test_env.Prepend(LINKFLAGS='-lmapnik')# + test_env['LINKFLAGS']
test_env.Append(LIBS='/home/artem/projects/mason/mason_packages/linux-x86_64/llvm/7.0.0/lib/libc++.a')
#test_env.Append(LIBS='/home/artem/projects/mason/mason_packages/linux-x86_64/llvm/7.0.0/lib/libc++abi.a')
#test_env.Append(LIBS='/home/artem/projects/mason/mason_packages/linux-x86_64/llvm/7.0.0/lib/libunwind.a')
test_env['LINKCOM'] = '$LINK -o $TARGET $SOURCES $LINKFLAGS $__RPATH $_LIBDIRFLAGS $_LIBFLAGS'
test_env['LINKFLAGS'] = '-l%s' % env['MAPNIK_NAME'] + test_env['LINKFLAGS']
if not env['CPP_TESTS']:
for cpp_test_bin in glob.glob('./*/*-bin'):
@ -16,7 +14,7 @@ if not env['CPP_TESTS']:
if os.path.exists('./unit/run'): os.unlink('./unit/run')
if os.path.exists('./visual/run'): os.unlink('./visual/run')
else:
test_env['LIBS'] = [env['MAPNIK_NAME']]
test_env['LIBS'] = []
test_env.AppendUnique(LIBS='mapnik-wkt')
test_env.AppendUnique(LIBS='mapnik-json')
test_env.AppendUnique(LIBS=copy(env['LIBMAPNIK_LIBS']))
@ -33,11 +31,10 @@ else:
test_env['LINKFLAGS'].append('-pthread')
test_env.AppendUnique(LIBS='boost_program_options%s' % env['BOOST_APPEND'])
test_env_local = test_env.Clone()
test_env_local['LINKCOM'] = '$LINK -o $TARGET $SOURCES $LINKFLAGS $__RPATH $_LIBDIRFLAGS $_LIBFLAGS'
# unit tests
sources = glob.glob('./unit/*/*.cpp')
sources.extend(glob.glob('./unit/*.cpp'))
sources.append('/home/artem/projects/mason/mason_packages/linux-x86_64/llvm/7.0.0/lib/libc++.a')
test_program = test_env_local.Program("./unit/run", source=sources)
Depends(test_program, env.subst('../src/%s' % env['MAPNIK_LIB_NAME']))
Depends(test_program, env.subst('../src/json/libmapnik-json${LIBSUFFIX}'))
@ -61,7 +58,6 @@ else:
visual/parse_map_sizes.cpp
"""
)
source.append('/home/artem/projects/mason/mason_packages/linux-x86_64/llvm/7.0.0/lib/libc++.a')
test_program3 = test_env_local.Program('visual/run', source=source)
Depends(test_program, env.subst('../src/%s' % env['MAPNIK_LIB_NAME']))

View file

@ -27,7 +27,7 @@ Import ('env')
Import ('plugin_base')
program_env = plugin_base.Clone()
program_env['LINKFLAGS'] = '-lmapnik plugins/input/csv/csv_utils.os' + program_env['LINKFLAGS']
program_env['LINKFLAGS'] = '-l%s plugins/input/csv/csv_utils.os' % plugin_base['MAPNIK_NAME'] + program_env['LINKFLAGS']
source = Split(
"""
mapnik-index.cpp