X-Git-Url: https://git.openstreetmap.org/nominatim.git/blobdiff_plain/6a7e0d652b1d40a397e1c1386d500101796676c4..118befd7d7453b7abf89afaa614e3edfafc47a1b:/CMakeLists.txt diff --git a/CMakeLists.txt b/CMakeLists.txt index 691c9adc..2b4c2976 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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") @@ -177,7 +177,7 @@ if (BUILD_TESTS) if (PYLINT) message(STATUS "Using pylint binary ${PYLINT}") add_test(NAME pylint - COMMAND ${PYLINT} --extension-pkg-whitelist=osmium nominatim + COMMAND ${PYLINT} nominatim WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}) else() message(WARNING "pylint not found. Python linting tests disabled.") @@ -238,7 +238,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)