]> git.openstreetmap.org Git - nominatim.git/blob - module/CMakeLists.txt
Merge pull request #1884 from lonvia/fixes-for-webserver-settigns
[nominatim.git] / module / CMakeLists.txt
1 # just use the pgxs makefile
2 find_program(PG_CONFIG pg_config)
3 execute_process(COMMAND ${PG_CONFIG} --pgxs
4             OUTPUT_VARIABLE PGXS
5             OUTPUT_STRIP_TRAILING_WHITESPACE)
6
7 if (NOT EXISTS "${PGXS}")
8 message(FATAL_ERROR "Postgresql server package not found.")
9 endif()
10
11 ADD_CUSTOM_COMMAND( OUTPUT ${CMAKE_CURRENT_SOURCE_DIR}/dummy
12         COMMAND PGXS=${PGXS} PG_CONFIG=${PG_CONFIG} MODSRCDIR=${CMAKE_CURRENT_SOURCE_DIR} $(MAKE) -f ${CMAKE_CURRENT_SOURCE_DIR}/Makefile
13         COMMENT "Running external makefile ${PGXS}"
14         )
15
16 ADD_CUSTOM_TARGET( nominatim_lib ALL
17         DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/dummy
18         )
19