slackbuilds_ponce/development/snappy/73.patch
Willy Sudiarto Raharjo 094df1d521
development/snappy: Fix build with gtest installed.
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
2020-04-07 01:26:07 +07:00

23 lines
732 B
Diff

From 89342ecf34894461cc64c9cbe3f8bc0d18df5073 Mon Sep 17 00:00:00 2001
From: "liangyukun.lyk" <lyk19961210@gmail.com>
Date: Mon, 27 Aug 2018 18:08:46 +0800
Subject: [PATCH] fix cmake build error
---
CMakeLists.txt | 3 +++
1 file changed, 3 insertions(+)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 41a2124..2a822dd 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -145,6 +145,9 @@ if(SNAPPY_BUILD_TESTS)
target_compile_definitions(snappy_unittest PRIVATE -DHAVE_CONFIG_H)
target_link_libraries(snappy_unittest snappy ${GFLAGS_LIBRARIES})
+ if(HAVE_GTEST)
+ target_link_libraries(snappy_unittest gtest)
+ endif(HAVE_GTEST)
if(HAVE_LIBZ)
target_link_libraries(snappy_unittest z)
endif(HAVE_LIBZ)