]> git.openstreetmap.org Git - nominatim.git/commitdiff
Merge remote-tracking branch 'upstream/master'
authorSarah Hoffmann <lonvia@denofr.de>
Tue, 16 Feb 2021 20:33:18 +0000 (21:33 +0100)
committerSarah Hoffmann <lonvia@denofr.de>
Tue, 16 Feb 2021 20:33:18 +0000 (21:33 +0100)
1  2 
CMakeLists.txt

diff --combined CMakeLists.txt
index 7794a50b6305b16c1bf3f9ef8c3db0b7a7a311aa,5f8e4611689c003bc9e7221005be9bfbf4d99a4c..0e4234b5144bf8e1912e7ef308d1189d5e462a76
@@@ -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)