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'])
|
|
|
|
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 22:55:56 +02:00
|
|
|
libraries = [env['MAPNIK_NAME'],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)
|
|
|
|
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'))
|