1 #-----------------------------------------------------------------------------
7 #-----------------------------------------------------------------------------
9 cmake_minimum_required(VERSION 2.8 FATAL_ERROR)
10 list(APPEND CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake")
13 #-----------------------------------------------------------------------------
17 #-----------------------------------------------------------------------------
21 set(NOMINATIM_VERSION_MAJOR 2)
22 set(NOMINATIM_VERSION_MINOR 5)
24 set(NOMINATIM_VERSION "${NOMINATIM_VERSION_MAJOR}.${NOMINATIM_VERSION_MINOR}")
26 add_definitions(-DNOMINATIM_VERSION="${NOMINATIM_VERSION}")
29 #-----------------------------------------------------------------------------
31 # Find external dependencies
33 #-----------------------------------------------------------------------------
35 add_subdirectory(osm2pgsql)
37 find_package(Threads REQUIRED)
39 unset(PostgreSQL_TYPE_INCLUDE_DIR CACHE)
40 set(PostgreSQL_TYPE_INCLUDE_DIR "/usr/include/")
41 find_package(PostgreSQL REQUIRED)
42 include_directories(${PostgreSQL_INCLUDE_DIRS})
44 find_program(PG_CONFIG pg_config)
45 execute_process(COMMAND ${PG_CONFIG} --pgxs
47 OUTPUT_STRIP_TRAILING_WHITESPACE)
49 find_package(ZLIB REQUIRED)
51 find_package(BZip2 REQUIRED)
53 find_package(LibXml2 REQUIRED)
54 include_directories(${LIBXML2_INCLUDE_DIR})
56 #-----------------------------------------------------------------------------
58 add_subdirectory(module)
59 add_subdirectory(nominatim)
61 #-----------------------------------------------------------------------------