mirror of
https://github.com/osm-search/Nominatim.git
synced 2024-09-11 19:17:17 +03:00
adapt cmake to new directory structure
This commit is contained in:
parent
5d302a03a6
commit
aef1357066
@ -72,7 +72,7 @@ endif()
|
|||||||
# python (imports/updates only)
|
# python (imports/updates only)
|
||||||
#-----------------------------------------------------------------------------
|
#-----------------------------------------------------------------------------
|
||||||
|
|
||||||
if (BUILD_IMPORTER)
|
if (BUILD_IMPORTER OR BUILD_API)
|
||||||
find_package(PythonInterp 3.7 REQUIRED)
|
find_package(PythonInterp 3.7 REQUIRED)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
@ -221,11 +221,13 @@ if (BUILD_IMPORTER)
|
|||||||
DESTINATION ${CMAKE_INSTALL_BINDIR}
|
DESTINATION ${CMAKE_INSTALL_BINDIR}
|
||||||
RENAME nominatim)
|
RENAME nominatim)
|
||||||
|
|
||||||
install(DIRECTORY nominatim
|
foreach (submodule nominatim_core nominatim_db nominatim_api)
|
||||||
|
install(DIRECTORY src/${submodule}
|
||||||
DESTINATION ${NOMINATIM_LIBDIR}/lib-python
|
DESTINATION ${NOMINATIM_LIBDIR}/lib-python
|
||||||
FILES_MATCHING PATTERN "*.py"
|
FILES_MATCHING PATTERN "*.py"
|
||||||
PATTERN "paths.py" EXCLUDE
|
PATTERN "paths.py" EXCLUDE
|
||||||
PATTERN __pycache__ EXCLUDE)
|
PATTERN __pycache__ EXCLUDE)
|
||||||
|
endforeach()
|
||||||
|
|
||||||
if (EXISTS ${PHP_BIN})
|
if (EXISTS ${PHP_BIN})
|
||||||
configure_file(${PROJECT_SOURCE_DIR}/cmake/paths-py.tmpl paths-py.installed)
|
configure_file(${PROJECT_SOURCE_DIR}/cmake/paths-py.tmpl paths-py.installed)
|
||||||
@ -233,7 +235,7 @@ if (BUILD_IMPORTER)
|
|||||||
configure_file(${PROJECT_SOURCE_DIR}/cmake/paths-py-no-php.tmpl paths-py.installed)
|
configure_file(${PROJECT_SOURCE_DIR}/cmake/paths-py-no-php.tmpl paths-py.installed)
|
||||||
endif()
|
endif()
|
||||||
install(FILES ${PROJECT_BINARY_DIR}/paths-py.installed
|
install(FILES ${PROJECT_BINARY_DIR}/paths-py.installed
|
||||||
DESTINATION ${NOMINATIM_LIBDIR}/lib-python/nominatim
|
DESTINATION ${NOMINATIM_LIBDIR}/lib-python/nominatim_core
|
||||||
RENAME paths.py)
|
RENAME paths.py)
|
||||||
|
|
||||||
install(DIRECTORY lib-sql DESTINATION ${NOMINATIM_LIBDIR})
|
install(DIRECTORY lib-sql DESTINATION ${NOMINATIM_LIBDIR})
|
||||||
|
@ -4,8 +4,8 @@ import os
|
|||||||
|
|
||||||
sys.path.insert(1, '@NOMINATIM_LIBDIR@/lib-python')
|
sys.path.insert(1, '@NOMINATIM_LIBDIR@/lib-python')
|
||||||
|
|
||||||
from nominatim import cli
|
from nominatim_db import cli
|
||||||
from nominatim import version
|
from nominatim_db import version
|
||||||
|
|
||||||
version.GIT_COMMIT_HASH = '@GIT_HASH@'
|
version.GIT_COMMIT_HASH = '@GIT_HASH@'
|
||||||
|
|
||||||
|
@ -2,10 +2,10 @@
|
|||||||
import sys
|
import sys
|
||||||
import os
|
import os
|
||||||
|
|
||||||
sys.path.insert(1, '@CMAKE_SOURCE_DIR@')
|
sys.path.insert(1, '@CMAKE_SOURCE_DIR@/src')
|
||||||
|
|
||||||
from nominatim import cli
|
from nominatim_db import cli
|
||||||
from nominatim import version
|
from nominatim_db import version
|
||||||
|
|
||||||
version.GIT_COMMIT_HASH = '@GIT_HASH@'
|
version.GIT_COMMIT_HASH = '@GIT_HASH@'
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user