cmake/Modules/FindLibPQ.cmake
author Tero Marttila <terom@fixme.fi>
Wed, 27 May 2009 23:57:48 +0300
branchnew-lib-errors
changeset 217 7728d6ec3abf
parent 68 591a574f390e
permissions -rw-r--r--
nexus.c compiles
# Find libevent
# Once done, this will define:
#
#   LibPQ_FOUND
#   LibPQ_INCLUDE_DIRS
#   LibPQ_LIBRARIES
#
# Currently, this only supports libevent-svn (i.e. 1.5/2.0), so it's kind of useless for real use :)

include (LibFindMacros)

# include dir
find_path (LibPQ_INCLUDE_DIR
    NAMES "postgresql/libpq-fe.h"
    PATHS "$ENV{POSTGRESQL_PREFIX}/include"
)

# library
find_library (LibPQ_LIBRARY
    NAMES "pq"
    PATHS "$ENV{POSTGRESQL_PREFIX}/lib"
)

# set the external vars
set (LibPQ_PROCESS_INCLUDES LibPQ_INCLUDE_DIR)
set (LibPQ_PROCESS_LIBS LibPQ_LIBRARY)
libfind_process (LibPQ)