2014-02-10 19:46:48 +01:00
|
|
|
import os
|
|
|
|
import glob
|
|
|
|
from copy import copy
|
|
|
|
|
|
|
|
Import ('env')
|
|
|
|
program_env = env.Clone()
|
|
|
|
|
|
|
|
source = Split(
|
|
|
|
"""
|
2015-10-12 19:38:58 +02:00
|
|
|
mapnik-render.cpp
|
2014-02-10 19:46:48 +01:00
|
|
|
"""
|
|
|
|
)
|
|
|
|
|
|
|
|
program_env['CXXFLAGS'] = copy(env['LIBMAPNIK_CXXFLAGS'])
|
2018-03-09 12:52:06 +01:00
|
|
|
program_env['LINKFLAGS'] = '-lmapnik -lmapnik-json ' + program_env['LINKFLAGS']
|
2014-02-10 19:46:48 +01:00
|
|
|
program_env.Append(CPPDEFINES = env['LIBMAPNIK_DEFINES'])
|
|
|
|
|
|
|
|
if env['HAS_CAIRO']:
|
|
|
|
program_env.PrependUnique(CPPPATH=env['CAIRO_CPPPATHS'])
|
|
|
|
program_env.Append(CPPDEFINES = '-DHAVE_CAIRO')
|
|
|
|
|
|
|
|
boost_program_options = 'boost_program_options%s' % env['BOOST_APPEND']
|
2018-03-09 12:52:06 +01:00
|
|
|
libraries = [boost_program_options]
|
2014-02-10 19:46:48 +01:00
|
|
|
libraries.extend(copy(env['LIBMAPNIK_LIBS']))
|
|
|
|
if env['RUNTIME_LINK'] == 'static' and env['PLATFORM'] == 'Linux':
|
|
|
|
libraries.append('dl')
|
|
|
|
|
2015-10-12 19:38:58 +02:00
|
|
|
mapnik_render = program_env.Program('mapnik-render', source, LIBS=libraries)
|
2015-10-12 22:38:01 +02:00
|
|
|
Depends(mapnik_render, env.subst('../../src/%s' % env['MAPNIK_LIB_NAME']))
|
2014-02-10 19:46:48 +01:00
|
|
|
|
|
|
|
if 'uninstall' not in COMMAND_LINE_TARGETS:
|
2015-10-12 19:38:58 +02:00
|
|
|
env.Install(os.path.join(env['INSTALL_PREFIX'],'bin'), mapnik_render)
|
2014-02-10 19:46:48 +01:00
|
|
|
env.Alias('install', os.path.join(env['INSTALL_PREFIX'],'bin'))
|
|
|
|
|
2015-10-12 19:38:58 +02:00
|
|
|
env['create_uninstall_target'](env, os.path.join(env['INSTALL_PREFIX'],'bin','mapnik-render'))
|