]> git.openstreetmap.org Git - nominatim.git/commitdiff
Set osmosis if available
authorMelvyn Sopacua <m.r.sopacua@gmail.com>
Fri, 17 Feb 2017 16:00:15 +0000 (17:00 +0100)
committerSarah Hoffmann <lonvia@denofr.de>
Sat, 18 Feb 2017 16:58:11 +0000 (17:58 +0100)
CMakeLists.txt
settings/defaults.php

index 324b5c915ae21fbe4a5231d2cf13aa91f243e103..44574610674aa30f3190368ea3fb4dabb246a79d 100644 (file)
@@ -42,6 +42,15 @@ unset(PostgreSQL_TYPE_INCLUDE_DIR CACHE)
 set(PostgreSQL_TYPE_INCLUDE_DIR "/usr/include/")
 find_package(PostgreSQL REQUIRED)
 include_directories(${PostgreSQL_INCLUDE_DIRS})
+find_program(OSMOSIS osmosis)
+if (NOT EXISTS "${OSMOSIS}")
+        set(OSMOSIS_PATH "/nonexistent")
+        message(WARNING "Osmosis not found (required for updates)")
+else()
+        set(OSMOSIS_PATH "${OSMOSIS}")
+        message(STATUS "Using osmosis at ${OSMOSIS_PATH}")
+endif()
+
 
 find_program(PG_CONFIG pg_config)
 execute_process(COMMAND ${PG_CONFIG} --pgxs
index e34f4db04200a96549569c91c5bda4587b1ef5a5..0b63a3bdce2332c0dc65f3a7c14ee5c8b67e9754 100644 (file)
@@ -40,7 +40,7 @@ if (isset($_GET['debug']) && $_GET['debug']) @define('CONST_Debug', true);
 
 // Paths
 @define('CONST_Osm2pgsql_Binary', CONST_InstallPath.'/osm2pgsql/osm2pgsql');
-@define('CONST_Osmosis_Binary', '/usr/bin/osmosis');
+@define('CONST_Osmosis_Binary', '@OSMOSIS_PATH@');
 @define('CONST_Tiger_Data_Path', CONST_BasePath.'/data/tiger');
 @define('CONST_Wikipedia_Data_Path', CONST_BasePath.'/data');