mirror of
https://github.com/google/snappy.git
synced 2024-12-03 14:53:15 +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
be6dc3db83
commit
56d9b14b54
|
@ -119,7 +119,10 @@ if(SNAPPY_BUILD_TESTS)
|
||||||
"${PROJECT_SOURCE_DIR}/snappy-test.cc"
|
"${PROJECT_SOURCE_DIR}/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 ${GFLAGS_LIBRARIES})
|
target_link_libraries(snappy_unittest
|
||||||
|
snappy
|
||||||
|
${GFLAGS_LIBRARIES}
|
||||||
|
${GTEST_LIBRARIES})
|
||||||
|
|
||||||
if(HAVE_LIBZ)
|
if(HAVE_LIBZ)
|
||||||
target_link_libraries(snappy_unittest z)
|
target_link_libraries(snappy_unittest z)
|
||||||
|
|
Loading…
Reference in a new issue