diff --git a/test/unit/datasource/geojson.cpp b/test/unit/datasource/geojson.cpp index 2a61c77e9..f5ad119a8 100644 --- a/test/unit/datasource/geojson.cpp +++ b/test/unit/datasource/geojson.cpp @@ -52,7 +52,12 @@ mapnik::feature_ptr fetch_first_feature(std::string const& filename, bool cache_ int create_disk_index(std::string const& filename, bool silent) { - std::string cmd = "mapnik-index " + filename; + std::string cmd; + if (std::getenv("DYLD_LIBRARY_PATH") != nullptr) + { + cmd += std::string("export DYLD_LIBRARY_PATH=") + std::getenv("DYLD_LIBRARY_PATH") + " && "; + } + cmd += "mapnik-index " + filename; if (silent) { #ifndef _WINDOWS