mapnik/utils/nik2img/build.py

35 lines
1 KiB
Python
Raw Normal View History

2014-02-10 18:46:48 +00:00
import os
import glob
from copy import copy
Import ('env')
program_env = env.Clone()
source = Split(
"""
nik2img.cpp
"""
)
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']
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')
nik2img = program_env.Program('nik2img', source, LIBS=libraries)
Depends(nik2img, env.subst('../../src/%s' % env['MAPNIK_LIB_NAME']))
if 'uninstall' not in COMMAND_LINE_TARGETS:
env.Install(os.path.join(env['INSTALL_PREFIX'],'bin'), nik2img)
env.Alias('install', os.path.join(env['INSTALL_PREFIX'],'bin'))
env['create_uninstall_target'](env, os.path.join(env['INSTALL_PREFIX'],'bin','nik2img'))