+if (BUILD_IMPORTER)
+ set(CUSTOMSCRIPTS
+ check_import_finished.php
+ country_languages.php
+ export.php
+ query.php
+ setup.php
+ specialphrases.php
+ update.php
+ warm.php
+ )
+
+ foreach (script_source ${CUSTOMSCRIPTS})
+ configure_file(${PROJECT_SOURCE_DIR}/cmake/script.tmpl
+ ${PROJECT_BINARY_DIR}/utils/${script_source})
+ endforeach()
+
+ configure_file(${PROJECT_SOURCE_DIR}/cmake/tool.tmpl
+ ${PROJECT_BINARY_DIR}/nominatim)
+endif()
+
+#-----------------------------------------------------------------------------
+# Targets for running a development webserver from the build directory.
+#-----------------------------------------------------------------------------
+
+if (BUILD_API)
+ add_custom_target(serve
+ php -S 127.0.0.1:8088
+ WORKING_DIRECTORY ${PROJECT_BINARY_DIR}/website
+ )
+
+ add_custom_target(serve-global
+ php -S 0.0.0.0:8088
+ WORKING_DIRECTORY ${PROJECT_BINARY_DIR}/website
+ )
+endif()