[Greater-commits] r182 - trunk/GREAT-ER-DB/trunk/impl/postgresql/cmake
scm-commit@wald.intevation.org
scm-commit at wald.intevation.org
Thu Jun 9 17:40:28 CEST 2011
Author: aheinecke
Date: 2011-06-09 17:40:28 +0200 (Thu, 09 Jun 2011)
New Revision: 182
Modified:
trunk/GREAT-ER-DB/trunk/impl/postgresql/cmake/FindPostgresql.cmake
Log:
Also look for libecpg in findpostgresql
Modified: trunk/GREAT-ER-DB/trunk/impl/postgresql/cmake/FindPostgresql.cmake
===================================================================
--- trunk/GREAT-ER-DB/trunk/impl/postgresql/cmake/FindPostgresql.cmake 2011-06-09 15:39:41 UTC (rev 181)
+++ trunk/GREAT-ER-DB/trunk/impl/postgresql/cmake/FindPostgresql.cmake 2011-06-09 15:40:28 UTC (rev 182)
@@ -1,17 +1,17 @@
# - Find PostgreSQL
# Find the PostgreSQL includes and client library
+# Also add the ecpg library if it is available.
# This module defines
# POSTGRESQL_INCLUDE_DIR, where to find POSTGRESQL.h
# POSTGRESQL_LIBRARIES, the libraries needed to use POSTGRESQL.
# POSTGRESQL_FOUND, If false, do not try to use PostgreSQL.
#
# Copyright (c) 2006, Jaroslaw Staniek, <js at iidea.pl>
+# Copyright (c) 2011, Andre Heinecke <aheinecke at intevation.de>
#
# Redistribution and use is allowed according to the terms of the BSD license.
# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
-# Add the postgresql and mysql include paths here
-
if(POSTGRESQL_INCLUDE_DIR AND POSTGRESQL_LIBRARIES)
set(POSTGRESQL_FOUND TRUE)
@@ -44,9 +44,26 @@
$ENV{SystemDrive}/PostgreSQL/*/lib/ms
)
+ find_library(ECPG_LIBRARIES NAMES ecpg libecpg
+ PATHS
+ /usr/lib
+ /usr/local/lib
+ /usr/lib/postgresql
+ /usr/lib64
+ /usr/local/lib64
+ /usr/lib64/postgresql
+ /usr/local/pgsql/lib
+ $ENV{ProgramFiles}/PostgreSQL/*/lib/ms
+ $ENV{SystemDrive}/PostgreSQL/*/lib/ms
+ )
+
if(POSTGRESQL_INCLUDE_DIR AND POSTGRESQL_LIBRARIES)
set(POSTGRESQL_FOUND TRUE)
message(STATUS "Found PostgreSQL: ${POSTGRESQL_INCLUDE_DIR}, ${POSTGRESQL_LIBRARIES}")
+ if (ECPG_LIBRARIES)
+ message(STATUS "Found ECPG Libraries: ${ECPG_LIBRARIES}")
+ endif(ECPG_LIBRARIES)
+ set(POSTGRESQL_LIBRARIES ${POSTGRESQL_LIBRARIES} ${ECPG_LIBRARIES})
INCLUDE_DIRECTORIES(${POSTGRESQL_INCLUDE_DIR})
else(POSTGRESQL_INCLUDE_DIR AND POSTGRESQL_LIBRARIES)
set(POSTGRESQL_FOUND FALSE)
More information about the Greater-commits
mailing list