From b140cfbdf0b9359c4c3ac79f39d0ea79b41621f2 Mon Sep 17 00:00:00 2001 From: Jochen Topf Date: Mon, 9 Feb 2026 13:30:42 +0100 Subject: [PATCH 1/3] We have more than one executable now --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index ea277eeb2..62c2886f3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -245,7 +245,7 @@ endif() message(STATUS "Libraries used to build: ${LIBS}") ############################################################# -# Build the library and executable file +# Build the library and executable files ############################################################# add_subdirectory(src) From be4f803fecb1c074ee34573beb14b8a2e82e94de Mon Sep 17 00:00:00 2001 From: Jochen Topf Date: Sat, 30 May 2026 19:55:21 +0200 Subject: [PATCH 2/3] Add missing consts --- src/geom-from-osm.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/geom-from-osm.cpp b/src/geom-from-osm.cpp index 339148300..7e6b5b081 100644 --- a/src/geom-from-osm.cpp +++ b/src/geom-from-osm.cpp @@ -135,7 +135,7 @@ geometry_t create_polygon(osmium::Way const &way, void create_multipoint(geometry_t *geom, osmium::memory::Buffer const &buffer) { - auto nodes = buffer.select(); + auto const nodes = buffer.select(); if (nodes.size() == 1) { auto const location = nodes.cbegin()->location(); if (location.valid()) { @@ -176,7 +176,7 @@ void create_multilinestring(geometry_t *geom, osmium::memory::Buffer const &buffer, bool force_multi) { - auto ways = buffer.select(); + auto const ways = buffer.select(); if (ways.size() == 1 && !force_multi) { auto &line = geom->set(); auto const &way = *ways.cbegin(); From 033fe7109aa6101cf214ec66c749865ff86aa133 Mon Sep 17 00:00:00 2001 From: Jochen Topf Date: Tue, 2 Jun 2026 11:36:49 +0200 Subject: [PATCH 3/3] Remove CMake config special case for Nominatim integration Not needed any more, because Nominatim now works with stock osm2pgsql. --- .github/workflows/test-install.yml | 1 + CMakeLists.txt | 23 ++++++----------------- man/CMakeLists.txt | 10 ++++------ 3 files changed, 11 insertions(+), 23 deletions(-) diff --git a/.github/workflows/test-install.yml b/.github/workflows/test-install.yml index 4b28eb924..bb361e701 100644 --- a/.github/workflows/test-install.yml +++ b/.github/workflows/test-install.yml @@ -78,6 +78,7 @@ jobs: run: | test -d $PREFIX/bin test -e $PREFIX/bin/osm2pgsql + test -e $PREFIX/bin/osm2pgsql-expire test -e $PREFIX/bin/osm2pgsql-replication test -d $PREFIX/share/man/man1 test -f $PREFIX/share/man/man1/osm2pgsql.1 diff --git a/CMakeLists.txt b/CMakeLists.txt index 62c2886f3..587489508 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -7,15 +7,6 @@ set(CMAKE_EXPORT_COMPILE_COMMANDS ON) list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake") -# Do not create install targets when run as a subproject. -# Currently used by Nominatim which cannot yet rely on installed versions -# of osm2pgsql. -if (${PROJECT_NAME} STREQUAL ${CMAKE_PROJECT_NAME}) - set(ENABLE_INSTALL ON) -else() - set(ENABLE_INSTALL OFF) -endif() - if (NOT ${CMAKE_SIZEOF_VOID_P} EQUAL 8) message(FATAL_ERROR "osm2pgsql needs a 64 bit architecture") endif() @@ -328,12 +319,10 @@ add_subdirectory(man) include(GNUInstallDirs) -if (ENABLE_INSTALL) - install(TARGETS osm2pgsql DESTINATION bin) - install(TARGETS osm2pgsql-expire DESTINATION bin) - install(FILES default.style empty.style DESTINATION share/osm2pgsql) - install(PROGRAMS scripts/osm2pgsql-replication DESTINATION bin) - if (BUILD_GEN) - install(TARGETS osm2pgsql-gen DESTINATION bin) - endif() +install(TARGETS osm2pgsql DESTINATION bin) +install(TARGETS osm2pgsql-expire DESTINATION bin) +install(FILES default.style empty.style DESTINATION share/osm2pgsql) +install(PROGRAMS scripts/osm2pgsql-replication DESTINATION bin) +if (BUILD_GEN) + install(TARGETS osm2pgsql-gen DESTINATION bin) endif() diff --git a/man/CMakeLists.txt b/man/CMakeLists.txt index 8f2356e49..d57687682 100644 --- a/man/CMakeLists.txt +++ b/man/CMakeLists.txt @@ -69,10 +69,8 @@ if(MANPAGE_TARGETS) add_custom_target(man DEPENDS ${MANPAGE_TARGETS} VERBATIM) endif() -if(ENABLE_INSTALL) - install(FILES osm2pgsql.1 DESTINATION share/man/man1) - install(FILES osm2pgsql-replication.1 DESTINATION share/man/man1) - if (BUILD_GEN) - install(FILES osm2pgsql-gen.1 DESTINATION share/man/man1) - endif() +install(FILES osm2pgsql.1 DESTINATION share/man/man1) +install(FILES osm2pgsql-replication.1 DESTINATION share/man/man1) +if (BUILD_GEN) + install(FILES osm2pgsql-gen.1 DESTINATION share/man/man1) endif()