summaryrefslogtreecommitdiffstats
path: root/cpp/CMakeLists.txt
diff options
context:
space:
mode:
authorroubert@google.com <roubert@google.com@ee073f10-1060-11df-b6a4-87a95322a99c>2012-10-05 09:04:05 +0000
committerroubert@google.com <roubert@google.com@ee073f10-1060-11df-b6a4-87a95322a99c>2012-10-05 09:04:05 +0000
commit84fec3c723f8c005ff34cecefcaeba38ee383778 (patch)
treee9121234cab82a5d92ace75c32b03582f0bfe61e /cpp/CMakeLists.txt
parent66c7f0ebf7b31f041067099e2bbef62fb6ab6f0b (diff)
downloadandroid_external_libphonenumbergoogle-84fec3c723f8c005ff34cecefcaeba38ee383778.tar.gz
android_external_libphonenumbergoogle-84fec3c723f8c005ff34cecefcaeba38ee383778.tar.bz2
android_external_libphonenumbergoogle-84fec3c723f8c005ff34cecefcaeba38ee383778.zip
CPP: Update CMake rules for Google Test to not require a pre-compiled static
library but be able to build the library from source as current practice is. Review URL: https://codereview.appspot.com/6602047 git-svn-id: http://libphonenumber.googlecode.com/svn/trunk@531 ee073f10-1060-11df-b6a4-87a95322a99c
Diffstat (limited to 'cpp/CMakeLists.txt')
-rw-r--r--cpp/CMakeLists.txt4
1 files changed, 3 insertions, 1 deletions
diff --git a/cpp/CMakeLists.txt b/cpp/CMakeLists.txt
index 7150659..80157c6 100644
--- a/cpp/CMakeLists.txt
+++ b/cpp/CMakeLists.txt
@@ -23,6 +23,8 @@ set (libphonenumber_VERSION_MINOR 1)
# Helper functions dealing with finding libraries and programs this library
# depends on.
+include (../tools/cpp/gtest.cmake)
+
function (print_error DESCRIPTION FILE)
message (FATAL_ERROR
"Can't find ${DESCRIPTION}: can't locate ${FILE}. Please read the README.")
@@ -82,7 +84,7 @@ if (NOT Boost_FOUND)
endif ()
include_directories (${Boost_INCLUDE_DIRS})
-find_required_library (GTEST gtest/gtest.h gtest "Google Test framework")
+find_or_build_gtest ()
if (${USE_RE2} STREQUAL "ON")
find_required_library (RE2 re2/re2.h re2 "Google RE2")