allow compile against ICU 4.0 - needed to be able to link against osx provided libicucore.dylib

This commit is contained in:
Dane Springmeyer 2011-08-11 21:13:55 +00:00
parent af62ad9c27
commit 3b424e3767
3 changed files with 10 additions and 3 deletions

View file

@ -62,9 +62,9 @@ First, here is a quick list of the required software dependencies:
- system
- thread
- filesystem
- regex (built against libicu >= 4.2)
- regex (optionally built with icu regex support)
- python - required only for python bindings (see below)
- libicu >= 4.2 - International Components for Unicode
- libicu >= 4.0 - International Components for Unicode
- libpng - PNG Graphics
- libjpeg - JPEG Graphics
- libtiff - TIFF Graphics

View file

@ -809,7 +809,7 @@ int main()
return False
major, minor = map(int,result.split('.'))
if major >= 4 and minor >= 2:
if major >= 4 and minor >= 0:
color_print(4,'\nFound icu version... %s\n' % result)
return True

View file

@ -29,6 +29,9 @@
#include <mapnik/hit_test_filter.hpp>
#include <mapnik/scale_denominator.hpp>
// icu
#include <unicode/uversion.h>
namespace mapnik
{
@ -653,7 +656,11 @@ void Map::init_metawriters()
void Map::set_metawriter_property(std::string name, std::string value)
{
#if (U_ICU_VERSION_MAJOR_NUM > 4) || (U_ICU_VERSION_MAJOR_NUM == 4 && U_ICU_VERSION_MINOR_NUM >=2)
metawriter_output_properties[name] = UnicodeString::fromUTF8(value);
#else
metawriter_output_properties[name] = UnicodeString(value.c_str());
#endif
}
std::string Map::get_metawriter_property(std::string name) const