summaryrefslogtreecommitdiff
blob: b1b8a2cd5e978783ba70949f4568e74791845e57 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
From 93d30c53e28759c9dbe82535821f3b1df29e5767 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org>
Date: Thu, 29 Jun 2017 10:01:37 +0200
Subject: [PATCH 3/3] 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 | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 3d1a304..9f2cc23 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -144,7 +144,7 @@ ENDIF (HAVE_LIBQUICKLZ)
 ADD_EXECUTABLE(snappy-unittest snappy_unittest.cc snappy-test.cc)
 TARGET_COMPILE_DEFINITIONS(snappy-unittest PRIVATE -DHAVE_CONFIG_H)
 TARGET_LINK_LIBRARIES(snappy-unittest snappy ${COMPRESSION_LIBS}
-                      ${GFLAGS_LIBRARIES})
+                      ${GFLAGS_LIBRARIES} ${GTEST_LIBRARIES})
 TARGET_INCLUDE_DIRECTORIES(snappy-unittest BEFORE PRIVATE ${Snappy_SOURCE_DIR}
                            ${GTEST_INCLUDE_DIRS} ${GFLAGS_INCLUDE_DIRS})
 
-- 
2.13.2