Permalink
Browse files

add cmake support for POSTGIS_HAS_SERVER_VERSION (#4675)

  • Loading branch information...
1 parent 862de58 commit 2864ae0e6736c1ae694642793e40e5986f643a5a @tbonfort tbonfort committed Jul 22, 2013
Showing with 3 additions and 0 deletions.
  1. +2 −0 CMakeLists.txt
  2. +1 −0 mapserver-config.h.in
View
@@ -2,6 +2,7 @@ cmake_minimum_required (VERSION 2.6)
project (MapServer)
+include(CheckLibraryExists)
include(CheckFunctionExists)
include(CheckIncludeFile)
include(CheckCSourceCompiles)
@@ -473,6 +474,7 @@ if(WITH_POSTGIS)
endif()
include_directories(${POSTGRESQL_INCLUDE_DIR})
ms_link_libraries( ${POSTGRESQL_LIBRARY})
+ CHECK_LIBRARY_EXISTS(pq "PQserverVersion" POSTGRESQL_LIBRARY POSTGIS_HAS_SERVER_VERSION)
set (USE_POSTGIS 1)
else(POSTGRESQL_FOUND)
report_optional_not_found(POSTGIS)
@@ -34,6 +34,7 @@
#cmakedefine USE_EXEMPI 1
#cmakedefine USE_XMLMAPFILE 1
#cmakedefine USE_GENERIC_MS_NINT 1
+#cmakedefine POSTGIS_HAS_SERVER_VERSION 1
/*windows specific hacks*/
#if defined(_WIN32)

0 comments on commit 2864ae0

Please sign in to comment.