1 # just use the pgxs makefile
3 foreach(suffix ${PostgreSQL_ADDITIONAL_VERSIONS} "15" "14" "13" "12" "11" "10" "9.6")
4 list(APPEND PG_CONFIG_HINTS
5 "/usr/pgsql-${suffix}/bin")
8 find_program(PG_CONFIG pg_config HINTS ${PG_CONFIG_HINTS})
12 execute_process(COMMAND ${PG_CONFIG} --pgxs
14 OUTPUT_STRIP_TRAILING_WHITESPACE)
16 if (NOT EXISTS "${PGXS}")
17 message(FATAL_ERROR "Postgresql server package not found.")
20 ADD_CUSTOM_COMMAND( OUTPUT ${CMAKE_CURRENT_SOURCE_DIR}/dummy
21 COMMAND PGXS=${PGXS} PG_CONFIG=${PG_CONFIG} MODSRCDIR=${CMAKE_CURRENT_SOURCE_DIR} $(MAKE) -f ${CMAKE_CURRENT_SOURCE_DIR}/Makefile
22 COMMENT "Running external makefile ${PGXS}"
25 ADD_CUSTOM_TARGET( nominatim_lib ALL
26 DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/dummy