diff options
author | Alex Neundorf <neundorf@kde.org> | 2011-07-28 21:14:52 (GMT) |
---|---|---|
committer | Alex Neundorf <neundorf@kde.org> | 2011-08-01 20:30:20 (GMT) |
commit | 217d068b6d131247b1fbae1ec901c942b30f7f80 (patch) | |
tree | 8a0a794dabe4ebac23d31dd0ad7460cfc5abb494 /Modules/FindPostgreSQL.cmake | |
parent | 49a00ec2def5882aa056638c3ae0b3088157de93 (diff) | |
download | CMake-217d068b6d131247b1fbae1ec901c942b30f7f80.zip CMake-217d068b6d131247b1fbae1ec901c942b30f7f80.tar.gz CMake-217d068b6d131247b1fbae1ec901c942b30f7f80.tar.bz2 |
More PATH_SUFFIXES for finding Postgresql and also search catalog/pg_type.h
Patch from Jaroslaw Staniek, reviewed by Andrew Maclean
Alex
Diffstat (limited to 'Modules/FindPostgreSQL.cmake')
-rw-r--r-- | Modules/FindPostgreSQL.cmake | 22 |
1 files changed, 22 insertions, 0 deletions
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} |