Fix linking with Postgres libs on older cmake versions

* integrates https://github.com/minetest/minetest/pull/11215
  so it backported a24899bf2d
* closes https://github.com/minetest/minetest/issues/12149
* closes https://github.com/minetest/minetest/issues/11219
* backported 998e4820c9
stable-4.X-namespace
mckaygerhard 2023-09-12 21:44:47 -04:00
parent 23d8b837f4
commit aa98a66666
1 changed files with 2 additions and 0 deletions

View File

@ -200,6 +200,8 @@ if(ENABLE_POSTGRESQL)
# but we don't need them, so continue anyway if only those are missing. # but we don't need them, so continue anyway if only those are missing.
if(PostgreSQL_INCLUDE_DIR AND PostgreSQL_LIBRARY) if(PostgreSQL_INCLUDE_DIR AND PostgreSQL_LIBRARY)
set(PostgreSQL_FOUND TRUE) set(PostgreSQL_FOUND TRUE)
set(PostgreSQL_INCLUDE_DIRS ${PostgreSQL_INCLUDE_DIR})
set(PostgreSQL_LIBRARIES ${PostgreSQL_LIBRARY})
endif() endif()
else() else()
find_package(PostgreSQL) find_package(PostgreSQL)