1 # just use the pgxs makefile
2 find_program(PG_CONFIG pg_config)
3 execute_process(COMMAND ${PG_CONFIG} --pgxs
5 OUTPUT_STRIP_TRAILING_WHITESPACE)
7 if (NOT EXISTS "${PGXS}")
8 message(FATAL_ERROR "Postgresql server package not found.")
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}"
16 ADD_CUSTOM_TARGET( nominatim_lib ALL
17 DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/dummy