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 #-----------------------------------------------------------------------------
37 add_subdirectory(osm2pgsql)
39 find_package(Threads REQUIRED)
41 unset(PostgreSQL_TYPE_INCLUDE_DIR CACHE)
42 set(PostgreSQL_TYPE_INCLUDE_DIR "/usr/include/")
43 find_package(PostgreSQL REQUIRED)
44 include_directories(${PostgreSQL_INCLUDE_DIRS})
46 find_program(PG_CONFIG pg_config)
47 execute_process(COMMAND ${PG_CONFIG} --pgxs
49 OUTPUT_STRIP_TRAILING_WHITESPACE)
51 find_package(ZLIB REQUIRED)
53 find_package(BZip2 REQUIRED)
55 find_package(LibXml2 REQUIRED)
56 include_directories(${LIBXML2_INCLUDE_DIR})
58 #-----------------------------------------------------------------------------
60 # Setup settings and paths
62 #-----------------------------------------------------------------------------
66 settings/phrase_settings.php
76 utils/country_languages.php
78 utils/importWikipedia.php
80 utils/server_compare.php
82 utils/specialphrases.php
87 foreach (cfile ${CUSTOMFILES})
88 configure_file(${PROJECT_SOURCE_DIR}/${cfile} ${PROJECT_BINARY_DIR}/${cfile})
91 set(WEBPATHS css images js)
93 foreach (wp ${WEBPATHS})
95 COMMAND ln -sf ${PROJECT_SOURCE_DIR}/website/${wp} ${PROJECT_BINARY_DIR}/website/
100 #-----------------------------------------------------------------------------
104 #-----------------------------------------------------------------------------
108 set(TEST_BDD db osm2pgsql api)
110 foreach (test ${TEST_BDD})
111 add_test(NAME bdd_${test}
112 COMMAND lettuce features/${test}
113 WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}/tests)
114 set_tests_properties(bdd_${test}
115 PROPERTIES ENVIRONMENT "NOMINATIM_DIR=${PROJECT_BINARY_DIR}")
120 WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}/tests-php)
122 #-----------------------------------------------------------------------------
124 add_subdirectory(module)
125 add_subdirectory(nominatim)
127 #-----------------------------------------------------------------------------