allow compilation of ogrindex and ogr plugin on mac osx
This commit is contained in:
parent
ebe9cc1bfe
commit
31d6475655
4 changed files with 13 additions and 6 deletions
|
@ -34,12 +34,16 @@ ogr_src = Split(
|
|||
)
|
||||
|
||||
libraries = [env['PLUGINS']['ogr']['lib']]
|
||||
|
||||
if env['PLATFORM'] == 'Darwin':
|
||||
if env['BOOST_SYSTEM_REQUIRED']:
|
||||
boost_system = 'boost_system%s' % env['BOOST_APPEND']
|
||||
libraries.append(boost_system)
|
||||
libraries.append('mapnik')
|
||||
libraries.append('icuuc')
|
||||
libraries.append('icudata')
|
||||
libraries.append('boost_system%s' % env['BOOST_APPEND'])
|
||||
libraries.append('boost_filesystem%s' % env['BOOST_APPEND'])
|
||||
libraries.append('boost_iostreams%s' % env['BOOST_APPEND'])
|
||||
|
||||
ogr_inputdriver = env.SharedLibrary('ogr', source=ogr_src, SHLIBPREFIX='', SHLIBSUFFIX='.input', LIBS=libraries)
|
||||
|
||||
|
|
|
@ -120,7 +120,7 @@ ogr_datasource::ogr_datasource(parameters const& params)
|
|||
extent_.init (envelope.MinX, envelope.MinY, envelope.MaxX, envelope.MaxY);
|
||||
|
||||
// scan for index file
|
||||
int breakpoint = dataset_name_.find_last_of (".");
|
||||
unsigned breakpoint = dataset_name_.find_last_of (".");
|
||||
if (breakpoint == std::string::npos) breakpoint = dataset_name_.length();
|
||||
index_name_ = dataset_name_.substr(0, breakpoint) + ".index";
|
||||
std::ifstream index_file (index_name_.c_str(), std::ios::in | std::ios::binary);
|
||||
|
|
|
@ -39,9 +39,12 @@ boost_iostreams = 'boost_iostreams%s' % env['BOOST_APPEND']
|
|||
boost_filesystem = 'boost_filesystem%s' % env['BOOST_APPEND']
|
||||
libraries = [boost_program_options,boost_iostreams,boost_filesystem,env['PLUGINS']['ogr']['lib'],'mapnik']
|
||||
|
||||
if env['PLATFORM'] == 'Darwin' and env['BOOST_SYSTEM_REQUIRED']:
|
||||
boost_system = 'boost_system%s' % env['BOOST_APPEND']
|
||||
libraries.append(boost_system)
|
||||
if env['PLATFORM'] == 'Darwin':
|
||||
if env['BOOST_SYSTEM_REQUIRED']:
|
||||
boost_system = 'boost_system%s' % env['BOOST_APPEND']
|
||||
libraries.append(boost_system)
|
||||
libraries.append('icuuc')
|
||||
libraries.append('icudata')
|
||||
|
||||
|
||||
ogrindex = env.Program('ogrindex', source, CPPPATH=headers, LIBS=libraries)
|
||||
|
|
|
@ -129,7 +129,7 @@ int main (int argc,char** argv)
|
|||
continue;
|
||||
}
|
||||
|
||||
int breakpoint = ogrname.find_last_of (".");
|
||||
unsigned breakpoint = ogrname.find_last_of (".");
|
||||
if (breakpoint == string::npos) breakpoint = ogrname.length();
|
||||
std::string ogrlayername (ogrname.substr(0, breakpoint));
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue