You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gentoo-overlay/app-arch/snappy/files/snappy-1.1.7-0001-cmake-Add...

32 lines
1017 B

From 1c9f699a6275f085ad710c9ae940e096ce552452 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org>
Date: Mon, 31 Jul 2017 20:49:22 +0200
Subject: [PATCH] cmake: Add missing linking to GTEST_LIBRARIES
Since the snappy_unittest target uses gtest routines (when available),
it needs to link to gtest explicitly. Otherwise, the build fails due
to unavailable gtest symbols.
---
CMakeLists.txt | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 3f534b1..3a44aa9 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -118,7 +118,10 @@ if(SNAPPY_BUILD_TESTS)
"${PROJECT_SOURCE_DIR}/snappy-test.cc"
)
target_compile_definitions(snappy_unittest PRIVATE -DHAVE_CONFIG_H)
- target_link_libraries(snappy_unittest snappy ${GFLAGS_LIBRARIES})
+ target_link_libraries(snappy_unittest
+ snappy
+ ${GFLAGS_LIBRARIES}
+ ${GTEST_LIBRARIES})
if(HAVE_LIBZ)
target_link_libraries(snappy_unittest z)
--
2.14.1