Skip to content

Commit

Permalink
fix(cmake): increase minimum version to 3.15, fix Data::PostgreSQL in…
Browse files Browse the repository at this point in the history
…clude target, remove unnecessary cmake modules that are provided with CMake itself (#4540)
  • Loading branch information
matejk committed Oct 16, 2024
1 parent f0a2948 commit 6f34ec8
Show file tree
Hide file tree
Showing 8 changed files with 4 additions and 983 deletions.
13 changes: 1 addition & 12 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
cmake_minimum_required(VERSION 3.5.0)
cmake_policy(VERSION 3.15.0)
cmake_minimum_required(VERSION 3.15.0)

project(Poco)

Expand Down Expand Up @@ -33,12 +32,6 @@ endforeach(OUTPUTCONFIG)
# Append our module directory to CMake
list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake)

if(CMAKE_VERSION VERSION_LESS "3.10")
list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake/V39)
endif()
if(CMAKE_VERSION VERSION_LESS "3.14")
list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake/V313)
endif()
#################################################################################
# Setup C/C++ compiler options
#################################################################################
Expand Down Expand Up @@ -562,10 +555,6 @@ install(
if(POCO_UNBUNDLED)
install(FILES cmake/FindPCRE2.cmake
DESTINATION "${PocoConfigPackageLocation}")
install(FILES cmake/V39/FindEXPAT.cmake
DESTINATION "${PocoConfigPackageLocation}/V39")
install(FILES cmake/V313/FindSQLite3.cmake
DESTINATION "${PocoConfigPackageLocation}/V313")
endif()

message(STATUS "CMake ${CMAKE_VERSION} successfully configured ${PROJECT_NAME} using ${CMAKE_GENERATOR} generator")
Expand Down
2 changes: 1 addition & 1 deletion Data/PostgreSQL/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ set_target_properties(DataPostgreSQL
DEFINE_SYMBOL PostgreSQL_EXPORTS
)

target_link_libraries(DataPostgreSQL PUBLIC Poco::Data PostgreSQL::client)
target_link_libraries(DataPostgreSQL PUBLIC Poco::Data PostgreSQL::PostgreSQL)
target_include_directories(DataPostgreSQL
PUBLIC
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ and [Getting Started](https://pocoproject.org/docs/00200-GettingStarted.html) do

### Prerequisites

- CMake 3.5 or newer
- CMake 3.15 or newer
- A C++17 compiler (Visual C++ 2017, GCC 8.0, Clang 5, or newer)
- OpenSSL headers and libraries (optional, but recommended)
- MySQL, PostgreSQL and ODBC client libraries (optional)
Expand Down Expand Up @@ -76,7 +76,7 @@ $ brew install cmake openssl mysql-client libpq

### Building with CMake (Linux, macOS, Windows)

[CMake](https://cmake.org) (version 3.5 or newer) is the recommended build system for
[CMake](https://cmake.org) (version 3.15 or newer) is the recommended build system for
building the POCO C++ Libraries.

```
Expand Down
148 changes: 0 additions & 148 deletions cmake/FindODBC.cmake

This file was deleted.

Loading

0 comments on commit 6f34ec8

Please sign in to comment.