2009-05-11 22:19:02 +00:00
|
|
|
#
|
|
|
|
# This file is part of Mapnik (c++ mapping toolkit)
|
|
|
|
#
|
2013-11-06 00:54:13 +00:00
|
|
|
# Copyright (C) 2013 Artem Pavlenko
|
2009-05-11 22:19:02 +00:00
|
|
|
#
|
|
|
|
# Mapnik is free software; you can redistribute it and/or
|
|
|
|
# modify it under the terms of the GNU Lesser General Public
|
|
|
|
# License as published by the Free Software Foundation; either
|
|
|
|
# version 2.1 of the License, or (at your option) any later version.
|
|
|
|
#
|
|
|
|
# This library is distributed in the hope that it will be useful,
|
|
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
# Lesser General Public License for more details.
|
|
|
|
#
|
|
|
|
# You should have received a copy of the GNU Lesser General Public
|
|
|
|
# License along with this library; if not, write to the Free Software
|
|
|
|
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
|
|
|
#
|
2012-08-27 23:43:40 +00:00
|
|
|
#
|
2009-05-11 22:19:02 +00:00
|
|
|
|
2011-08-12 21:31:28 +00:00
|
|
|
import os
|
2009-05-11 22:19:02 +00:00
|
|
|
import glob
|
|
|
|
|
|
|
|
Import ('env')
|
|
|
|
|
2010-09-18 18:02:15 +00:00
|
|
|
program_env = env.Clone()
|
|
|
|
|
2009-05-11 22:19:02 +00:00
|
|
|
source = Split(
|
|
|
|
"""
|
|
|
|
ogrindex.cpp
|
|
|
|
"""
|
|
|
|
)
|
|
|
|
|
|
|
|
headers = ['#plugins/input/ogr'] + env['CPPPATH']
|
|
|
|
|
2011-08-29 21:12:22 +00:00
|
|
|
program_env['LIBS'] = [env['PLUGINS']['ogr']['lib']]
|
2009-05-11 22:19:02 +00:00
|
|
|
|
2011-08-29 21:12:22 +00:00
|
|
|
# Link Library to Dependencies
|
2014-06-09 20:55:56 +00:00
|
|
|
program_env['LIBS'].append(env['MAPNIK_NAME'])
|
2011-08-29 21:12:22 +00:00
|
|
|
program_env['LIBS'].append(env['ICU_LIB_NAME'])
|
|
|
|
program_env['LIBS'].append('boost_system%s' % env['BOOST_APPEND'])
|
|
|
|
program_env['LIBS'].append('boost_program_options%s' % env['BOOST_APPEND'])
|
2010-02-21 03:07:47 +00:00
|
|
|
|
2011-08-29 21:12:22 +00:00
|
|
|
if env['RUNTIME_LINK'] == 'static':
|
|
|
|
cmd = 'gdal-config --dep-libs'
|
|
|
|
program_env.ParseConfig(cmd)
|
2009-05-11 22:19:02 +00:00
|
|
|
|
2013-10-22 20:35:46 +00:00
|
|
|
ogrindex = program_env.Program('ogrindex', source, CPPPATH=headers)
|
2011-08-29 21:12:22 +00:00
|
|
|
|
|
|
|
Depends(ogrindex, env.subst('../../src/%s' % env['MAPNIK_LIB_NAME']))
|
2009-05-11 22:19:02 +00:00
|
|
|
|
2010-07-18 20:39:05 +00:00
|
|
|
if 'uninstall' not in COMMAND_LINE_TARGETS:
|
2011-08-12 21:31:28 +00:00
|
|
|
env.Install(os.path.join(env['INSTALL_PREFIX'],'bin'), ogrindex)
|
|
|
|
env.Alias('install', os.path.join(env['INSTALL_PREFIX'],'bin'))
|