configure osm2pgsql and module location via cmake

The default location of osm2pgsql and the postgresql module
is decided at compile/installation time and is not necessarily
in the project directory.

With this change it is now possible to have a project directory
that is completely separate from the build directory.
This commit is contained in:
Sarah Hoffmann
2021-01-04 11:37:56 +01:00
parent cba2d252c8
commit 5e989b9296
3 changed files with 4 additions and 10 deletions

View File

@@ -42,7 +42,7 @@ class SetupFunctions
$this->iCacheMemory = getCacheMemoryMB();
}
$this->sModulePath = getSetting('DATABASE_MODULE_PATH', CONST_InstallDir.'/module');
$this->sModulePath = getSetting('DATABASE_MODULE_PATH', CONST_Default_ModulePath);
info('module path: ' . $this->sModulePath);
// parse database string
@@ -736,9 +736,6 @@ class SetupFunctions
fwriteConstDef($rFile, 'LibDir', CONST_LibDir);
fwriteConstDef($rFile, 'DataDir', CONST_DataDir);
fwriteConstDef($rFile, 'InstallDir', CONST_InstallDir);
fwrite($rFile, "if (file_exists(getenv('NOMINATIM_SETTINGS'))) require_once(getenv('NOMINATIM_SETTINGS'));\n\n");
fwriteConstDef($rFile, 'Database_DSN', getSetting('DATABASE_DSN'));
fwriteConstDef($rFile, 'Default_Language', getSetting('DEFAULT_LANGUAGE'));
fwriteConstDef($rFile, 'Log_DB', getSettingBool('LOG_DB'));