]> git.openstreetmap.org Git - nominatim.git/blobdiff - CMakeLists.txt
Merge branch 'separate-compilation' of https://github.com/eyusupov/Nominatim into...
[nominatim.git] / CMakeLists.txt
index 3e55f628aa008e8b3ddbb92e3947251bfbac3fa4..31a572d67bf83df36eb97147d37e7b85c21140ef 100644 (file)
@@ -19,7 +19,7 @@ list(APPEND CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake")
 project(nominatim)
 
 set(NOMINATIM_VERSION_MAJOR 3)
-set(NOMINATIM_VERSION_MINOR 3)
+set(NOMINATIM_VERSION_MINOR 4)
 set(NOMINATIM_VERSION_PATCH 0)
 
 set(NOMINATIM_VERSION "${NOMINATIM_VERSION_MAJOR}.${NOMINATIM_VERSION_MINOR}.${NOMINATIM_VERSION_PATCH}")
@@ -39,14 +39,19 @@ set(BUILD_DOCS on CACHE BOOL "Build documentation")
 set(BUILD_SERVER on CACHE BOOL "Build API server")
 set(BUILD_MODULE on CACHE BOOL "Build PostgreSQL module")
 set(BUILD_NOMINATIM on CACHE BOOL "Build Nominatim executable")
+set(BUILD_OSM2PGSQL on CACHE BOOL "Build osm2pgsql")
 
 if (BUILD_SERVER)
-    if (NOT EXISTS "${CMAKE_SOURCE_DIR}/osm2pgsql/CMakeLists.txt")
-        message(FATAL_ERROR "The osm2pgsql directory is empty.\
-        Did you forget to check out Nominatim recursively?\
-        \nTry updating submodules with: git submodule update --init")
+    if (BUILD_OSM2PGSQL)
+       if (NOT EXISTS "${CMAKE_SOURCE_DIR}/osm2pgsql/CMakeLists.txt")
+           message(FATAL_ERROR "The osm2pgsql directory is empty.\
+           Did you forget to check out Nominatim recursively?\
+           \nTry updating submodules with: git submodule update --init")
+       endif()
+       add_subdirectory(osm2pgsql)
     endif()
-    add_subdirectory(osm2pgsql)
+
+    find_package(PythonInterp 3)
 
     find_program(PYOSMIUM pyosmium-get-changes)
     if (NOT EXISTS "${PYOSMIUM}")