summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorparkesb <brian.r.parkes@gmail.com>2022-08-31 14:23:39 (GMT)
committerBrad King <brad.king@kitware.com>2022-08-31 14:37:13 (GMT)
commitf799e0f23d498268720bc77f86650d9a278d2222 (patch)
treea570465c7527329dfca2da3eb98db85fb8ae35cd
parent3aebeb1b5539b6696c50950dd4b2c817f0da3d68 (diff)
downloadCMake-f799e0f23d498268720bc77f86650d9a278d2222.zip
CMake-f799e0f23d498268720bc77f86650d9a278d2222.tar.gz
CMake-f799e0f23d498268720bc77f86650d9a278d2222.tar.bz2
FindPostgreSQL: Add brew-style directories to search path
As of 14.5, homebrew names PostgreSQL directories with the version number, e.g., `postgresql@14`.
-rw-r--r--Modules/FindPostgreSQL.cmake3
1 files changed, 3 insertions, 0 deletions
diff --git a/Modules/FindPostgreSQL.cmake b/Modules/FindPostgreSQL.cmake
index 2233aa0..c92fbdc 100644
--- a/Modules/FindPostgreSQL.cmake
+++ b/Modules/FindPostgreSQL.cmake
@@ -121,13 +121,16 @@ foreach(suffix ${PostgreSQL_KNOWN_VERSIONS})
if(UNIX)
list(APPEND PostgreSQL_LIBRARY_ADDITIONAL_SEARCH_SUFFIXES
"postgresql${suffix}"
+ "postgresql@${suffix}"
"pgsql-${suffix}/lib")
list(APPEND PostgreSQL_INCLUDE_ADDITIONAL_SEARCH_SUFFIXES
"postgresql${suffix}"
+ "postgresql@${suffix}"
"postgresql/${suffix}"
"pgsql-${suffix}/include")
list(APPEND PostgreSQL_TYPE_ADDITIONAL_SEARCH_SUFFIXES
"postgresql${suffix}/server"
+ "postgresql@${suffix}/server"
"postgresql/${suffix}/server"
"pgsql-${suffix}/include/server")
endif()