2014-02-10 18:46:48 +00:00
|
|
|
import os
|
|
|
|
import glob
|
|
|
|
from copy import copy
|
|
|
|
|
|
|
|
Import ('env')
|
|
|
|
program_env = env.Clone()
|
|
|
|
|
|
|
|
source = Split(
|
|
|
|
"""
|
2015-10-12 17:38:58 +00:00
|
|
|
mapnik-render.cpp
|
2014-02-10 18:46:48 +00:00
|
|
|
"""
|
|
|
|
)
|
|
|
|
|
|
|
|
program_env['CXXFLAGS'] = copy(env['LIBMAPNIK_CXXFLAGS'])
|
|
|
|
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']
|
2014-06-09 20:55:56 +00:00
|
|
|
libraries = [env['MAPNIK_NAME'],boost_program_options]
|
2014-02-10 18:46:48 +00:00
|
|
|
libraries.extend(copy(env['LIBMAPNIK_LIBS']))
|
|
|
|
if env['RUNTIME_LINK'] == 'static' and env['PLATFORM'] == 'Linux':
|
|
|
|
libraries.append('dl')
|
|
|
|
|
2015-10-12 17:38:58 +00:00
|
|
|
mapnik_render = program_env.Program('mapnik-render', source, LIBS=libraries)
|
2015-10-12 20:38:01 +00:00
|
|
|
Depends(mapnik_render, env.subst('../../src/%s' % env['MAPNIK_LIB_NAME']))
|
2014-02-10 18:46:48 +00:00
|
|
|
|
|
|
|
if 'uninstall' not in COMMAND_LINE_TARGETS:
|
2015-10-12 17:38:58 +00:00
|
|
|
env.Install(os.path.join(env['INSTALL_PREFIX'],'bin'), mapnik_render)
|
2014-02-10 18:46:48 +00:00
|
|
|
env.Alias('install', os.path.join(env['INSTALL_PREFIX'],'bin'))
|
|
|
|
|
2015-10-12 17:38:58 +00:00
|
|
|
env['create_uninstall_target'](env, os.path.join(env['INSTALL_PREFIX'],'bin','mapnik-render'))
|