From 0be6a31e1d5853e703388b766c34848479e03d74 Mon Sep 17 00:00:00 2001 From: Philip Liard Date: Mon, 21 Mar 2011 12:37:51 +0000 Subject: [PATCH] Cpp:Add protobuf version check. --- cpp/CMakeLists.txt | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/cpp/CMakeLists.txt b/cpp/CMakeLists.txt index 51f87e8ff..1e85d4ccb 100644 --- a/cpp/CMakeLists.txt +++ b/cpp/CMakeLists.txt @@ -81,6 +81,13 @@ if (PROTOBUF_LIB STREQUAL "PROTOBUF_LIB-NOTFOUND") "Can't find Google Protocol Buffers library. Please read README.") endif () +# Check Protocol Buffers version (if pkg-config available) +find_package (PkgConfig) + +if (PKG_CONFIG_EXECUTABLE) + pkg_check_modules (PC_PROTOBUF REQUIRED protobuf>=2.4) +endif (PKG_CONFIG_EXECUTABLE) + # Find ICU find_path (ICU_INCLUDE_DIR unicode/unistr.h unicode/normlzr.h)