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}" )