From 04a61e9338bf27921a3bd235b9356e73fd48ba3f Mon Sep 17 00:00:00 2001 From: stephb9959 Date: Mon, 8 Mar 2021 09:02:40 -0800 Subject: [PATCH] Fixed PostgreSQL CMake dependencies --- Data/PostgreSQL/CMakeLists.txt | 2 +- cmake/FindPostgreSQL.cmake | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Data/PostgreSQL/CMakeLists.txt b/Data/PostgreSQL/CMakeLists.txt index d02c2f106..2d6296433 100644 --- a/Data/PostgreSQL/CMakeLists.txt +++ b/Data/PostgreSQL/CMakeLists.txt @@ -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 $ diff --git a/cmake/FindPostgreSQL.cmake b/cmake/FindPostgreSQL.cmake index 9163b90fa..ccd768876 100644 --- a/cmake/FindPostgreSQL.cmake +++ b/cmake/FindPostgreSQL.cmake @@ -201,9 +201,9 @@ if(PostgreSQL_FOUND) set(PostgreSQL_LIBRARIES ${PostgreSQL_LIBRARY}) endif() -if(PostgreSQL_FOUND AND NOT TARGET PostgreSQL::client) - add_library(PostgreSQL::client UNKNOWN IMPORTED) - set_target_properties(PostgreSQL::client PROPERTIES +if(PostgreSQL_FOUND AND NOT TARGET PostgreSQL::PostgreSQL) + add_library(PostgreSQL::PostgreSQL UNKNOWN IMPORTED) + set_target_properties(PostgreSQL::PostgreSQL PROPERTIES IMPORTED_LOCATION "${PostgreSQL_LIBRARY}" INTERFACE_INCLUDE_DIRECTORIES "${PostgreSQL_INCLUDE_DIR}" )