Permalink
Browse files

Fix detection of libmemcached >= 1.0 on certain distros

  • Loading branch information...
sgolemon committed Jul 27, 2012
1 parent f90a98d commit 33d6f975428c6d05b331882211e3eccac7dba2a2
Showing with 7 additions and 2 deletions.
  1. +7 −2 CMake/FindLibmemcached.cmake
@@ -27,8 +27,13 @@ SET(LIBMEMCACHED_VERSION 0)
IF(LIBMEMCACHED_FOUND)
if (EXISTS "${LIBMEMCACHED_INCLUDE_DIR}/libmemcached/configure.h")
- FILE(READ "${LIBMEMCACHED_INCLUDE_DIR}/libmemcached/configure.h" _MEMCACHE_VERSION_CONENTS)
- STRING(REGEX REPLACE ".*#define LIBMEMCACHED_VERSION_STRING \"([0-9.]+)\".*" "\\1" LIBMEMCACHED_VERSION "${_MEMCACHE_VERSION_CONENTS}")
+ FILE(READ "${LIBMEMCACHED_INCLUDE_DIR}/libmemcached/configure.h" _MEMCACHE_VERSION_CONTENTS)
+ endif()
+ if (EXISTS "${LIBMEMCACHED_INCLUDE_DIR}/libmemcached-1.0/configure.h")
+ FILE(READ "${LIBMEMCACHED_INCLUDE_DIR}/libmemcached-1.0/configure.h" _MEMCACHE_VERSION_CONTENTS)
+ endif()
+ if (_MEMCACHE_VERSION_CONTENTS)
+ STRING(REGEX REPLACE ".*#define LIBMEMCACHED_VERSION_STRING \"([0-9.]+)\".*" "\\1" LIBMEMCACHED_VERSION "${_MEMCACHE_VERSION_CONTENTS}")
endif()
ENDIF()

0 comments on commit 33d6f97

Please sign in to comment.