Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Use further PATH_SUFFIX to clean module
  • Loading branch information
peremato committed Jun 21, 2016
commit c09fb37668cbcd9bf2d23791b916ee3c8396e3b7
33 changes: 4 additions & 29 deletions cmake/modules/FindPostgreSQL.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -12,37 +12,13 @@


find_path(POSTGRESQL_INCLUDE_DIR libpq-fe.h
PATHS ${POSTGRESQL_DIR}/include $ENV{POSTGRESQL_DIR}/include
"/usr/include/pgsql/"
"/usr/local/include/pgsql/"
"/usr/include/postgresql/"
"/usr/local/include/pgsql/server"
"/usr/local/include/postgresql/server"
"/usr/local/include/postgresql/*/server"
"/usr/local/pgsql/postgresql/server"
"/usr/local/pgsql/postgresql/*/server"
"/usr/local/*/include/"
"/usr/local/*/include/postgresql/"
"/usr/local/*/include/postgresql/server"
"/usr/include/server"
"/usr/include/pgsql/server"
"/usr/include/postgresql/server"
"/usr/include/postgresql/*/server"
PATH_SUFFIXES
postgresql
include
HINTS ${POSTGRESQL_DIR}/include $ENV{POSTGRESQL_DIR}/include
PATH_SUFFIXES pgsql pgsql/server postgresql postgresql/server
)

find_library(POSTGRESQL_LIBRARY NAMES pq
PATHS ${POSTGRESQL_DIR}/lib $ENV{POSTGRESQL_DIR}/lib
"/usr/lib/"
"/usr/lib64/"
"/usr/local/lib/"
"/usr/local/lib64/"
"/usr/lib/*/"
"/usr/local/*/"
"/usr/lib/posgresql/"
"/usr/lib64/posgresql/"
HINTS ${POSTGRESQL_DIR}/lib $ENV{POSTGRESQL_DIR}/lib
PATH_SUFFIXES pgsql posgresql
)

if(POSTGRESQL_LIBRARY)
Expand All @@ -54,4 +30,3 @@ find_package_handle_standard_args(PostgreSQL DEFAULT_MSG
POSTGRESQL_INCLUDE_DIR POSTGRESQL_LIBRARY)

mark_as_advanced(POSTGRESQL_INCLUDE_DIR POSTGRESQL_LIBRARY)