FindPostgreSQL: Add brew-style directories to search path

As of 14.5, homebrew names PostgreSQL directories with the version
number, e.g., `postgresql@14`.
This commit is contained in:
parkesb
2022-08-31 15:23:39 +01:00
committed by Brad King
parent 3aebeb1b55
commit f799e0f23d

View File

@@ -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()