mirror of
https://github.com/osm-search/Nominatim.git
synced 2026-03-07 10:34:08 +00:00
test for existance of country grid in cmake already
Given that the file potentially gets installed, it needs to be present during build time already. Checking during the import is too late.
This commit is contained in:
@@ -97,6 +97,17 @@ endif()
|
||||
#-----------------------------------------------------------------------------
|
||||
|
||||
if (BUILD_IMPORTER)
|
||||
find_file(COUNTRY_GRID_FILE country_osm_grid.sql.gz
|
||||
PATHS ${PROJECT_SOURCE_DIR}/data
|
||||
NO_DEFAULT_PATH
|
||||
DOC "Location of the country grid file."
|
||||
)
|
||||
|
||||
if (NOT COUNTRY_GRID_FILE)
|
||||
message(FATAL_ERROR "\nYou need to download the country_osm_grid first:\n"
|
||||
" wget -O ${PROJECT_SOURCE_DIR}/data/country_osm_grid.sql.gz https://www.nominatim.org/data/country_grid.sql.gz")
|
||||
endif()
|
||||
|
||||
set(CUSTOMSCRIPTS
|
||||
check_import_finished.php
|
||||
country_languages.php
|
||||
@@ -221,7 +232,7 @@ if (BUILD_IMPORTER)
|
||||
install(DIRECTORY lib-sql DESTINATION ${NOMINATIM_LIBDIR})
|
||||
|
||||
install(FILES data/country_name.sql
|
||||
data/country_osm_grid.sql.gz
|
||||
${COUNTRY_GRID_FILE}
|
||||
data/words.sql
|
||||
DESTINATION ${NOMINATIM_DATADIR})
|
||||
endif()
|
||||
|
||||
Reference in New Issue
Block a user