summaryrefslogtreecommitdiffstats
path: root/Modules/FindPostgreSQL.cmake
diff options
context:
space:
mode:
authorRolf Eike Beer <eike@sf-mail.de>2016-12-29 10:05:36 (GMT)
committerBrad King <brad.king@kitware.com>2017-01-10 14:52:42 (GMT)
commit5ffee691ee0c55d043238960cf1149cbcfb86047 (patch)
tree41087821255cd0585f0877c1441ceee467e9ad9e /Modules/FindPostgreSQL.cmake
parent12bea47fa4d47b8e887ddbaf4c4fcc312d3052dc (diff)
downloadCMake-5ffee691ee0c55d043238960cf1149cbcfb86047.zip
CMake-5ffee691ee0c55d043238960cf1149cbcfb86047.tar.gz
CMake-5ffee691ee0c55d043238960cf1149cbcfb86047.tar.bz2
FindPostgreSQL: automatically find installations from yum.postgresql.org
In commit v3.3.0-rc1~4^2 (FindPostgreSQL: Search some more common packaging locations) the PostgreSQL_ADDITIONAL_SEARCH_PATHS variable was removed. This was used e.g. by osm2pgsql to be able to build on CentOS with recent PostgreSQL versions. At least add those locations from yum.postgresql.org, which is a more or less official location.
Diffstat (limited to 'Modules/FindPostgreSQL.cmake')
-rw-r--r--Modules/FindPostgreSQL.cmake7
1 files changed, 6 insertions, 1 deletions
diff --git a/Modules/FindPostgreSQL.cmake b/Modules/FindPostgreSQL.cmake
index 874128c..9e2194c 100644
--- a/Modules/FindPostgreSQL.cmake
+++ b/Modules/FindPostgreSQL.cmake
@@ -88,8 +88,13 @@ foreach(suffix ${PostgreSQL_KNOWN_VERSIONS})
"PostgreSQL/${suffix}/include/server")
endif()
if(UNIX)
+ list(APPEND PostgreSQL_LIBRARY_ADDITIONAL_SEARCH_SUFFIXES
+ "pgsql-${suffix}/lib")
+ list(APPEND PostgreSQL_INCLUDE_ADDITIONAL_SEARCH_SUFFIXES
+ "pgsql-${suffix}/include")
list(APPEND PostgreSQL_TYPE_ADDITIONAL_SEARCH_SUFFIXES
- "postgresql/${suffix}/server")
+ "postgresql/${suffix}/server"
+ "pgsql-${suffix}/include/server")
endif()
endforeach()