Executables (including websites) need to be installed in the
build directory, so that they can find the right settings.php.
settings now defines build and source dir.
20 files changed:
#-----------------------------------------------------------------------------
set(BUILD_TESTS on)
#-----------------------------------------------------------------------------
set(BUILD_TESTS on)
add_subdirectory(osm2pgsql)
find_package(Threads REQUIRED)
add_subdirectory(osm2pgsql)
find_package(Threads REQUIRED)
#
#-----------------------------------------------------------------------------
#
#-----------------------------------------------------------------------------
-configure_file(
- ${PROJECT_SOURCE_DIR}/settings/settings.php
- ${PROJECT_BINARY_DIR}/settings/settings.php
-)
+set(CUSTOMFILES
+ settings/settings.php
+ settings/phrase_settings.php
+ website/deletable.php
+ website/details.php
+ website/hierarchy.php
+ website/lookup.php
+ website/polygons.php
+ website/reverse.php
+ website/search.php
+ website/status.php
+ utils/blocks.php
+ utils/country_languages.php
+ utils/imports.php
+ utils/importWikipedia.php
+ utils/query.php
+ utils/server_compare.php
+ utils/setup.php
+ utils/specialphrases.php
+ utils/update.php
+ utils/warm.php
+ )
+
+foreach (cfile ${CUSTOMFILES})
+ configure_file(${PROJECT_SOURCE_DIR}/${cfile} ${PROJECT_BINARY_DIR}/${cfile})
+endforeach()
+
+set(WEBPATHS css images js)
-configure_file(
- ${PROJECT_SOURCE_DIR}/settings/phrase_settings.php
- ${PROJECT_BINARY_DIR}/settings/phrase_settings.php
-)
+foreach (wp ${WEBPATHS})
+ execute_process(
+ COMMAND ln -sf ${PROJECT_SOURCE_DIR}/website/${wp} ${PROJECT_BINARY_DIR}/website/
+ )
+endforeach()
-execute_process(
- COMMAND ln -s -t ${PROJECT_BINARY_DIR} ${PROJECT_SOURCE_DIR}/utils
-)
#-----------------------------------------------------------------------------
#
#-----------------------------------------------------------------------------
#
- @define('CONST_BasePath', dirname(dirname(__FILE__)));
-
- require_once('settings/settings.php');
require_once(CONST_BasePath.'/lib/lib.php');
require_once(CONST_BasePath.'/lib/leakybucket.php');
require_once(CONST_BasePath.'/lib/db.php');
require_once(CONST_BasePath.'/lib/lib.php');
require_once(CONST_BasePath.'/lib/leakybucket.php');
require_once(CONST_BasePath.'/lib/db.php');
- @define('CONST_InstallPath', dirname(dirname(__FILE__)));
+ @define('CONST_BasePath', '@CMAKE_SOURCE_DIR@');
+ @define('CONST_InstallPath', '@CMAKE_BINARY_DIR@');
if (file_exists(CONST_InstallPath.'/settings/local.php')) require_once(CONST_InstallPath.'/settings/local.php');
if (isset($_GET['debug']) && $_GET['debug']) @define('CONST_Debug', true);
if (file_exists(CONST_InstallPath.'/settings/local.php')) require_once(CONST_InstallPath.'/settings/local.php');
if (isset($_GET['debug']) && $_GET['debug']) @define('CONST_Debug', true);
- require_once(dirname(dirname(__FILE__)).'/lib/init-cmd.php');
- ini_set('memory_limit', '800M');
+ require_once(dirname(dirname(__FILE__)).'/settings/settings.php');
+ require_once(CONST_BasePath.'/lib/init-cmd.php');
+ ini_set('memory_limit', '800M');
$aCMDOptions = array(
"Manage service blocks / restrictions",
$aCMDOptions = array(
"Manage service blocks / restrictions",
- require_once(dirname(dirname(__FILE__)).'/lib/init-cmd.php');
+ require_once(dirname(dirname(__FILE__)).'/settings/settings.php');
+ require_once(CONST_BasePath.'/lib/init-cmd.php');
+
ini_set('memory_limit', '800M');
ini_set('display_errors', 'stderr');
ini_set('memory_limit', '800M');
ini_set('display_errors', 'stderr');
- require_once(dirname(dirname(__FILE__)).'/lib/init-cmd.php');
+ require_once(dirname(dirname(__FILE__)).'/settings/settings.php');
+ require_once(CONST_BasePath.'/lib/init-cmd.php');
ini_set('memory_limit', '800M');
$aCMDOptions = array(
ini_set('memory_limit', '800M');
$aCMDOptions = array(
- require_once(dirname(dirname(__FILE__)).'/lib/init-cmd.php');
+ require_once(dirname(dirname(__FILE__)).'/settings/settings.php');
+ require_once(CONST_BasePath.'/lib/init-cmd.php');
ini_set('memory_limit', '800M');
$aCMDOptions = array(
ini_set('memory_limit', '800M');
$aCMDOptions = array(
- require_once(dirname(dirname(__FILE__)).'/lib/init-cmd.php');
- require_once(CONST_BasePath.'/lib/Geocode.php');
- ini_set('memory_limit', '800M');
+ require_once(dirname(dirname(__FILE__)).'/settings/settings.php');
+ require_once(CONST_BasePath.'/lib/init-cmd.php');
+ require_once(CONST_BasePath.'/lib/Geocode.php');
+ ini_set('memory_limit', '800M');
$aCMDOptions = array(
"Query database from command line. Returns search result as JSON.",
$aCMDOptions = array(
"Query database from command line. Returns search result as JSON.",
- require_once(dirname(dirname(__FILE__)).'/lib/init-cmd.php');
+ require_once(dirname(dirname(__FILE__)).'/settings/settings.php');
+ require_once(CONST_BasePath.'/lib/init-cmd.php');
ini_set('memory_limit', '800M');
$aCMDOptions = array(
ini_set('memory_limit', '800M');
$aCMDOptions = array(
- require_once(dirname(dirname(__FILE__)).'/lib/init-cmd.php');
- ini_set('memory_limit', '800M');
- ini_set('display_errors', 'stderr');
+ require_once(dirname(dirname(__FILE__)).'/settings/settings.php');
+ require_once(CONST_BasePath.'/lib/init-cmd.php');
+ ini_set('memory_limit', '800M');
+ ini_set('display_errors', 'stderr');
$aCMDOptions = array(
"Import and export special phrases",
$aCMDOptions = array(
"Import and export special phrases",
- require_once(dirname(dirname(__FILE__)).'/lib/init-cmd.php');
- ini_set('memory_limit', '800M');
+ require_once(dirname(dirname(__FILE__)).'/settings/settings.php');
+ require_once(CONST_BasePath.'/lib/init-cmd.php');
+ ini_set('memory_limit', '800M');
$aCMDOptions = array(
"Import / update / index osm data",
$aCMDOptions = array(
"Import / update / index osm data",
- require_once(dirname(dirname(__FILE__)).'/lib/init-cmd.php');
- ini_set('memory_limit', '800M');
+ require_once(dirname(dirname(__FILE__)).'/settings/settings.php');
+ require_once(CONST_BasePath.'/lib/init-cmd.php');
+ ini_set('memory_limit', '800M');
$aCMDOptions = array(
"Tools to warm nominatim db",
$aCMDOptions = array(
"Tools to warm nominatim db",
- require_once(dirname(dirname(__FILE__)).'/lib/init-website.php');
+ require_once(dirname(dirname(__FILE__)).'/settings/settings.php');
+ require_once(CONST_BasePath.'/lib/init-website.php');
require_once(CONST_BasePath.'/lib/log.php');
$sOutputFormat = 'html';
require_once(CONST_BasePath.'/lib/log.php');
$sOutputFormat = 'html';
<?php
@define('CONST_ConnectionBucket_PageType', 'Details');
<?php
@define('CONST_ConnectionBucket_PageType', 'Details');
- require_once(dirname(dirname(__FILE__)).'/lib/init-website.php');
+ require_once(dirname(dirname(__FILE__)).'/settings/settings.php');
+ require_once(CONST_BasePath.'/lib/init-website.php');
require_once(CONST_BasePath.'/lib/log.php');
$sOutputFormat = 'html';
require_once(CONST_BasePath.'/lib/log.php');
$sOutputFormat = 'html';
<?php
@define('CONST_ConnectionBucket_PageType', 'Details');
<?php
@define('CONST_ConnectionBucket_PageType', 'Details');
- require_once(dirname(dirname(__FILE__)).'/lib/init-website.php');
+ require_once(dirname(dirname(__FILE__)).'/settings/settings.php');
+ require_once(CONST_BasePath.'/lib/init-website.php');
require_once(CONST_BasePath.'/lib/log.php');
require_once(CONST_BasePath.'/lib/PlaceLookup.php');
require_once(CONST_BasePath.'/lib/log.php');
require_once(CONST_BasePath.'/lib/PlaceLookup.php');
<?php
@define('CONST_ConnectionBucket_PageType', 'Reverse');
<?php
@define('CONST_ConnectionBucket_PageType', 'Reverse');
- require_once(dirname(dirname(__FILE__)).'/lib/init-website.php');
+ require_once(dirname(dirname(__FILE__)).'/settings/settings.php');
+ require_once(CONST_BasePath.'/lib/init-website.php');
require_once(CONST_BasePath.'/lib/log.php');
require_once(CONST_BasePath.'/lib/PlaceLookup.php');
require_once(CONST_BasePath.'/lib/log.php');
require_once(CONST_BasePath.'/lib/PlaceLookup.php');
- require_once(dirname(dirname(__FILE__)).'/lib/init-website.php');
+ require_once(dirname(dirname(__FILE__)).'/settings/settings.php');
+ require_once(CONST_BasePath.'/lib/init-website.php');
require_once(CONST_BasePath.'/lib/log.php');
$sOutputFormat = 'html';
require_once(CONST_BasePath.'/lib/log.php');
$sOutputFormat = 'html';
<?php
@define('CONST_ConnectionBucket_PageType', 'Reverse');
<?php
@define('CONST_ConnectionBucket_PageType', 'Reverse');
- require_once(dirname(dirname(__FILE__)).'/lib/init-website.php');
+ require_once(dirname(dirname(__FILE__)).'/settings/settings.php');
+ require_once(CONST_BasePath.'/lib/init-website.php');
require_once(CONST_BasePath.'/lib/log.php');
require_once(CONST_BasePath.'/lib/PlaceLookup.php');
require_once(CONST_BasePath.'/lib/ReverseGeocode.php');
require_once(CONST_BasePath.'/lib/log.php');
require_once(CONST_BasePath.'/lib/PlaceLookup.php');
require_once(CONST_BasePath.'/lib/ReverseGeocode.php');
<?php
@define('CONST_ConnectionBucket_PageType', 'Search');
<?php
@define('CONST_ConnectionBucket_PageType', 'Search');
- require_once(dirname(dirname(__FILE__)).'/lib/init-website.php');
+ require_once(dirname(dirname(__FILE__)).'/settings/settings.php');
+ require_once(CONST_BasePath.'/lib/init-website.php');
require_once(CONST_BasePath.'/lib/log.php');
require_once(CONST_BasePath.'/lib/Geocode.php');
require_once(CONST_BasePath.'/lib/log.php');
require_once(CONST_BasePath.'/lib/Geocode.php');
<?php
@define('CONST_ConnectionBucket_PageType', 'Status');
<?php
@define('CONST_ConnectionBucket_PageType', 'Status');
- require_once(dirname(dirname(__FILE__)).'/lib/init-website.php');
+ require_once(dirname(dirname(__FILE__)).'/settings/settings.php');
+ require_once(CONST_BasePath.'/lib/init-website.php');
function statusError($sMsg)
{
function statusError($sMsg)
{