2011-10-12 03:11:59 +02:00
|
|
|
#!/usr/bin/env python
|
|
|
|
|
|
|
|
import os
|
2011-11-12 00:37:10 +01:00
|
|
|
Import ('plugin_base')
|
2011-10-12 03:11:59 +02:00
|
|
|
Import ('env')
|
|
|
|
|
|
|
|
PLUGIN_NAME = 'csv'
|
|
|
|
|
|
|
|
install_dest = env['MAPNIK_INPUT_PLUGINS_DEST']
|
2011-11-12 00:37:10 +01:00
|
|
|
plugin_env = plugin_base.Clone()
|
2011-10-12 03:11:59 +02:00
|
|
|
|
|
|
|
plugin_sources = Split(
|
|
|
|
"""
|
|
|
|
%(PLUGIN_NAME)s_datasource.cpp
|
|
|
|
""" % locals()
|
|
|
|
)
|
|
|
|
|
|
|
|
libraries = []
|
2011-11-23 12:33:58 +01:00
|
|
|
libraries.append('mapnik')
|
2012-02-10 01:00:11 +01:00
|
|
|
libraries.append('boost_system%s' % env['BOOST_APPEND'])
|
2011-10-12 03:11:59 +02:00
|
|
|
libraries.append(env['ICU_LIB_NAME'])
|
|
|
|
|
|
|
|
TARGET = plugin_env.SharedLibrary(
|
|
|
|
'../%s' % PLUGIN_NAME,
|
|
|
|
SHLIBPREFIX='',
|
|
|
|
SHLIBSUFFIX='.input',
|
|
|
|
source=plugin_sources,
|
|
|
|
LIBS=libraries,
|
|
|
|
LINKFLAGS=env.get('CUSTOM_LDFLAGS')
|
|
|
|
)
|
|
|
|
|
2011-11-23 12:33:58 +01:00
|
|
|
# if the plugin links to libmapnik ensure it is built first
|
2011-11-11 21:17:39 +01:00
|
|
|
Depends(TARGET, env.subst('../../../src/%s' % env['MAPNIK_LIB_NAME']))
|
2011-11-11 21:13:41 +01:00
|
|
|
|
2011-10-12 03:11:59 +02:00
|
|
|
if 'uninstall' not in COMMAND_LINE_TARGETS:
|
|
|
|
env.Install(install_dest, TARGET)
|
|
|
|
env.Alias('install', install_dest)
|