From 217d068b6d131247b1fbae1ec901c942b30f7f80 Mon Sep 17 00:00:00 2001 From: Alex Neundorf Date: Thu, 28 Jul 2011 23:14:52 +0200 Subject: More PATH_SUFFIXES for finding Postgresql and also search catalog/pg_type.h Patch from Jaroslaw Staniek, reviewed by Andrew Maclean Alex --- Modules/FindPostgreSQL.cmake | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/Modules/FindPostgreSQL.cmake b/Modules/FindPostgreSQL.cmake index 96b6741..3595b4d 100644 --- a/Modules/FindPostgreSQL.cmake +++ b/Modules/FindPostgreSQL.cmake @@ -113,6 +113,21 @@ find_path(PostgreSQL_INCLUDE_DIR # Look in other places. ${PostgreSQL_ROOT_DIRECTORIES} PATH_SUFFIXES + pgsql + postgresql + include + # Help the user find it if we cannot. + DOC "The ${PostgreSQL_INCLUDE_DIR_MESSAGE}" +) + +find_path(PostgreSQL_TYPE_INCLUDE_DIR + NAMES catalog/pg_type.h + PATHS + # Look in other places. + ${PostgreSQL_ROOT_DIRECTORIES} + PATH_SUFFIXES + server + pgsql postgresql include # Help the user find it if we cannot. @@ -156,6 +171,13 @@ if(PostgreSQL_FOUND) ) endif(EXISTS "${PostgreSQL_INCLUDE_DIR}") + if(EXISTS "${PostgreSQL_TYPE_INCLUDE_DIR}") + list(APPEND PostgreSQL_INCLUDE_DIRS + ${PostgreSQL_TYPE_INCLUDE_DIR} + ) + endif(EXISTS "${PostgreSQL_TYPE_INCLUDE_DIR}") + + if(EXISTS "${PostgreSQL_LIBRARY_DIR}") set(PostgreSQL_LIBRARY_DIRS ${PostgreSQL_LIBRARY_DIR} -- cgit v0.12