mirror of
https://github.com/google/snappy.git
synced 2024-11-28 05:44:33 +00:00
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.
This commit is contained in:
parent
513df5fb5a
commit
fbc0300e0b
|
@ -146,7 +146,7 @@ ENDIF (HAVE_LIBQUICKLZ)
|
||||||
ADD_EXECUTABLE(snappy-unittest snappy_unittest.cc snappy-test.cc)
|
ADD_EXECUTABLE(snappy-unittest snappy_unittest.cc snappy-test.cc)
|
||||||
TARGET_COMPILE_DEFINITIONS(snappy-unittest PRIVATE -DHAVE_CONFIG_H)
|
TARGET_COMPILE_DEFINITIONS(snappy-unittest PRIVATE -DHAVE_CONFIG_H)
|
||||||
TARGET_LINK_LIBRARIES(snappy-unittest snappy ${COMPRESSION_LIBS}
|
TARGET_LINK_LIBRARIES(snappy-unittest snappy ${COMPRESSION_LIBS}
|
||||||
${GFLAGS_LIBRARIES})
|
${GFLAGS_LIBRARIES} ${GTEST_LIBRARIES})
|
||||||
TARGET_INCLUDE_DIRECTORIES(snappy-unittest BEFORE PRIVATE ${Snappy_SOURCE_DIR}
|
TARGET_INCLUDE_DIRECTORIES(snappy-unittest BEFORE PRIVATE ${Snappy_SOURCE_DIR}
|
||||||
${GTEST_INCLUDE_DIRS} ${GFLAGS_INCLUDE_DIRS})
|
${GTEST_INCLUDE_DIRS} ${GFLAGS_INCLUDE_DIRS})
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue