From: Sarah Hoffmann Date: Tue, 16 Feb 2021 20:33:18 +0000 (+0100) Subject: Merge remote-tracking branch 'upstream/master' X-Git-Tag: deploy~180 X-Git-Url: https://git.openstreetmap.org./nominatim.git/commitdiff_plain/185ff683cfc2c6d65ec55a7c05d4cbbf35c077ff?ds=inline;hp=-c Merge remote-tracking branch 'upstream/master' --- 185ff683cfc2c6d65ec55a7c05d4cbbf35c077ff diff --combined CMakeLists.txt index 7794a50b,5f8e4611..0e4234b5 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@@ -6,7 -6,7 +6,7 @@@ # #----------------------------------------------------------------------------- - cmake_minimum_required(VERSION 2.8 FATAL_ERROR) + cmake_minimum_required(VERSION 3.0 FATAL_ERROR) list(APPEND CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake") @@@ -128,27 -128,6 +128,27 @@@ if (BUILD_IMPORTER ${PROJECT_BINARY_DIR}/nominatim) endif() +#----------------------------------------------------------------------------- +# Targets for running a development webserver from the build directory. +#----------------------------------------------------------------------------- + +if (BUILD_API) + set(WEBSITEFILES + 403.html + 509.html + crossdomain.xml + favicon.ico + nominatim.xml + robots.txt + taginfo.json + ) + + foreach (webfile ${WEBSITEFILES}) + configure_file(${PROJECT_SOURCE_DIR}/website/${webfile} + ${PROJECT_BINARY_DIR}/website/${webfile}) + endforeach() +endif() + #----------------------------------------------------------------------------- # Tests #----------------------------------------------------------------------------- @@@ -259,7 -238,14 +259,14 @@@ if (BUILD_IMPORTER endif() if (BUILD_OSM2PGSQL) - install(TARGETS osm2pgsql RUNTIME DESTINATION ${NOMINATIM_LIBDIR}) + if (${CMAKE_VERSION} VERSION_LESS 3.13) + # Installation of subdirectory targets was only introduced in 3.13. + # So just copy the osm2pgsql file for older versions. + install(PROGRAMS ${PROJECT_BINARY_DIR}/osm2pgsql/osm2pgsql + DESTINATION ${NOMINATIM_LIBDIR}) + else() + install(TARGETS osm2pgsql RUNTIME DESTINATION ${NOMINATIM_LIBDIR}) + endif() endif() if (BUILD_MODULE)