Index: CMakeLists.txt |
diff --git a/CMakeLists.txt b/CMakeLists.txt |
index bada89c7d572d936c3d5f2e39063523dc00b19f7..f74c05f6b7a611ada2b82553d79b4c1b9c236655 100644 |
--- a/CMakeLists.txt |
+++ b/CMakeLists.txt |
@@ -110,12 +110,13 @@ endif() |
if(TEST) |
find_library(GTEST_LIBRARY gtest) |
if(GTEST_LIBRARY STREQUAL "GTEST_LIBRARY-NOTFOUND") |
- set(GTEST_SRC_DIR /usr/src/gtest) |
+ set(GTEST_SRC_DIR /usr/src/gtest CACHE STRING "Location of gtest sources") |
if(EXISTS ${GTEST_SRC_DIR}/src/gtest-all.cc) |
message(STATUS "building gtest from sources in ${GTEST_SRC_DIR}") |
set(gtest_sources ${GTEST_SRC_DIR}/src/gtest-all.cc) |
add_library(gtest STATIC ${gtest_sources}) |
include_directories(${GTEST_SRC_DIR}) |
+ include_directories(${GTEST_SRC_DIR}/include) |
set(GTEST_LIBRARY gtest) |
else() |
message(FATAL_ERROR "TEST is set but unable to find gtest library") |
@@ -133,6 +134,8 @@ if(NACL AND NACL_LIBC STREQUAL "newlib") |
target_link_libraries(libyuv_unittest glibc-compat) |
endif() |
+target_link_libraries(libyuv_unittest gflags) |
+ |
install(TARGETS ${ly_lib_name} DESTINATION lib) |
install(FILES ${ly_header_files} DESTINATION include/libyuv) |
install(FILES ${ly_inc_dir}/libyuv.h DESTINATION include/) |