]> git.openstreetmap.org Git - nominatim.git/blobdiff - cmake/script.tmpl
rename lib to lib-php
[nominatim.git] / cmake / script.tmpl
index 5b7bc6f7decb2c7a8feb6aaa527028088966217e..5fdfe5424605aebb63c0bb931ca14188ffa8ca3e 100755 (executable)
@@ -1,9 +1,13 @@
 #!@PHP_BIN@ -Cq
 <?php
+require('@CMAKE_SOURCE_DIR@/lib-php/dotenv_loader.php');
+
 @define('CONST_Default_ModulePath', '@CMAKE_BINARY_DIR@/module');
 @define('CONST_Default_Osm2pgsql', '@CMAKE_BINARY_DIR@/osm2pgsql/osm2pgsql');
 @define('CONST_BinDir', '@CMAKE_SOURCE_DIR@/utils');
-@define('CONST_LibDir', '@CMAKE_SOURCE_DIR@/lib');
 @define('CONST_DataDir', '@CMAKE_SOURCE_DIR@');
 
-require_once(CONST_BinDir.'/@script_source@');
+loadDotEnv();
+$_SERVER['NOMINATIM_NOMINATIM_TOOL'] = '@CMAKE_BINARY_DIR@/nominatim';
+
+require_once('@CMAKE_SOURCE_DIR@/lib-php/admin/@script_source@');