2009-05-12 00:19:02 +02:00
|
|
|
#
|
|
|
|
# This file is part of Mapnik (c++ mapping toolkit)
|
|
|
|
#
|
2013-11-06 01:54:13 +01:00
|
|
|
# Copyright (C) 2013 Artem Pavlenko
|
2009-05-12 00:19:02 +02: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-28 01:43:40 +02:00
|
|
|
#
|
2009-05-12 00:19:02 +02:00
|
|
|
|
2011-08-12 23:31:28 +02:00
|
|
|
import os
|
2009-05-12 00:19:02 +02:00
|
|
|
import glob
|
|
|
|
|
|
|
|
Import ('env')
|
|
|
|
|
2010-09-18 20:02:15 +02:00
|
|
|
program_env = env.Clone()
|
|
|
|
|
2009-05-12 00:19:02 +02:00
|
|
|
source = Split(
|
|
|
|
"""
|
|
|
|
ogrindex.cpp
|
|
|
|
"""
|
|
|
|
)
|
|
|
|
|
|
|
|
headers = ['#plugins/input/ogr'] + env['CPPPATH']
|
|
|
|
|
2011-08-29 23:12:22 +02:00
|
|
|
program_env['LIBS'] = [env['PLUGINS']['ogr']['lib']]
|
2009-05-12 00:19:02 +02:00
|
|
|
|
2011-08-29 23:12:22 +02:00
|
|
|
# Link Library to Dependencies
|
2014-06-09 22:55:56 +02:00
|
|
|
program_env['LIBS'].append(env['MAPNIK_NAME'])
|
2011-08-29 23:12:22 +02: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 04:07:47 +01:00
|
|
|
|
2011-08-29 23:12:22 +02:00
|
|
|
if env['RUNTIME_LINK'] == 'static':
|
|
|
|
cmd = 'gdal-config --dep-libs'
|
|
|
|
program_env.ParseConfig(cmd)
|
2009-05-12 00:19:02 +02:00
|
|
|
|
2013-10-22 22:35:46 +02:00
|
|
|
ogrindex = program_env.Program('ogrindex', source, CPPPATH=headers)
|
2011-08-29 23:12:22 +02:00
|
|
|
|
|
|
|
Depends(ogrindex, env.subst('../../src/%s' % env['MAPNIK_LIB_NAME']))
|
2009-05-12 00:19:02 +02:00
|
|
|
|
2010-07-18 22:39:05 +02:00
|
|
|
if 'uninstall' not in COMMAND_LINE_TARGETS:
|
2011-08-12 23:31:28 +02:00
|
|
|
env.Install(os.path.join(env['INSTALL_PREFIX'],'bin'), ogrindex)
|
|
|
|
env.Alias('install', os.path.join(env['INSTALL_PREFIX'],'bin'))
|