61
|
1 |
# Find libevent
|
|
2 |
# Once done, this will define:
|
|
3 |
#
|
|
4 |
# LibPQ_FOUND
|
|
5 |
# LibPQ_INCLUDE_DIRS
|
|
6 |
# LibPQ_LIBRARIES
|
|
7 |
#
|
|
8 |
# Currently, this only supports libevent-svn (i.e. 1.5/2.0), so it's kind of useless for real use :)
|
|
9 |
|
|
10 |
include (LibFindMacros)
|
|
11 |
|
|
12 |
# include dir
|
|
13 |
find_path (LibPQ_INCLUDE_DIR
|
|
14 |
NAMES "postgresql/libpq-fe.h"
|
|
15 |
PATHS "$ENV{POSTGRESQL_PREFIX}/include"
|
|
16 |
)
|
|
17 |
|
|
18 |
# library
|
|
19 |
find_library (LibPQ_LIBRARY
|
|
20 |
NAMES "pq"
|
|
21 |
PATHS "$ENV{POSTGRESQL_PREFIX}/lib"
|
|
22 |
)
|
|
23 |
|
|
24 |
# set the external vars
|
|
25 |
set (LibPQ_PROCESS_INCLUDES LibPQ_INCLUDE_DIR)
|
|
26 |
set (LibPQ_PROCESS_LIBS LibPQ_LIBRARY)
|
|
27 |
libfind_process (LibPQ)
|