aboutsummaryrefslogtreecommitdiffhomepage
path: root/cmake/tests.cmake
diff options
context:
space:
mode:
authorGravatar Feng Xiao <xfxyjwf@gmail.com>2015-06-15 21:42:57 -0700
committerGravatar Feng Xiao <xfxyjwf@gmail.com>2015-06-17 11:19:46 -0700
commit818c5eee08840355d70d2f3bdf1a2f17986a5e70 (patch)
treee6db0b1344385f8c48820c58d7297f653bff39f7 /cmake/tests.cmake
parente96ff30120a3834f7d1e31e43e591bf7cfbd731f (diff)
Fix broken builds.
Diffstat (limited to 'cmake/tests.cmake')
-rw-r--r--cmake/tests.cmake11
1 files changed, 9 insertions, 2 deletions
diff --git a/cmake/tests.cmake b/cmake/tests.cmake
index 4396a657..16c94933 100644
--- a/cmake/tests.cmake
+++ b/cmake/tests.cmake
@@ -2,13 +2,20 @@ if (NOT EXISTS "${PROJECT_SOURCE_DIR}/../gmock/CMakeLists.txt")
message(FATAL_ERROR "Cannot find gmock directory.")
endif()
-add_subdirectory(../gmock ${PROJECT_BINARY_DIR}/gmock)
-
include_directories(
+ ${protobuf_source_dir}/gmock
+ ${protobuf_source_dir}/gmock/gtest
${protobuf_source_dir}/gmock/gtest/include
${protobuf_source_dir}/gmock/include
)
+add_library(gmock STATIC
+ ${protobuf_source_dir}/gmock/src/gmock-all.cc
+ ${protobuf_source_dir}/gmock/gtest/src/gtest-all.cc
+)
+add_library(gmock_main STATIC ${protobuf_source_dir}/gmock/src/gmock_main.cc)
+target_link_libraries(gmock_main gmock)
+
set(lite_test_protos
google/protobuf/map_lite_unittest.proto
google/protobuf/unittest_import_lite.proto