mirror of
https://github.com/scottlamb/moonfire-nvr.git
synced 2024-12-25 14:45:54 -05:00
Upgrade to latest googletest/googlemock release
The old release on googlecode.com now 404s, so out-of-the-box builds were broken. The releases on github have a slightly different file structure, so it's more than just a change of URL. I upgraded from 1.7.0 to 1.8.0 in the process.
This commit is contained in:
parent
6b6137f8e7
commit
60f0ffc970
@ -114,22 +114,22 @@ enable_testing()
|
||||
# http://www.kaizou.org/2014/11/gtest-cmake/
|
||||
include(ExternalProject)
|
||||
ExternalProject_Add(
|
||||
GMockProject
|
||||
URL "https://googlemock.googlecode.com/files/gmock-1.7.0.zip"
|
||||
URL_HASH "SHA1=f9d9dd882a25f4069ed9ee48e70aff1b53e3c5a5"
|
||||
GTestProject
|
||||
URL "https://github.com/google/googletest/archive/release-1.8.0.tar.gz"
|
||||
URL_HASH "SHA1=e7e646a6204638fe8e87e165292b8dd9cd4c36ed"
|
||||
INSTALL_COMMAND "")
|
||||
ExternalProject_Get_Property(GMockProject source_dir binary_dir)
|
||||
set(GTest_INCLUDE_DIR ${source_dir}/gtest/include)
|
||||
ExternalProject_Get_Property(GTestProject source_dir binary_dir)
|
||||
set(GTest_INCLUDE_DIR ${source_dir}/googletest/include)
|
||||
add_library(GTest STATIC IMPORTED)
|
||||
add_dependencies(GTest GMockProject)
|
||||
add_dependencies(GTest GTestProject)
|
||||
set_target_properties(GTest PROPERTIES
|
||||
IMPORTED_LOCATION "${binary_dir}/gtest/${CMAKE_STATIC_LIBRARY_PREFIX}gtest${CMAKE_STATIC_LIBRARY_SUFFIX}"
|
||||
IMPORTED_LOCATION "${binary_dir}/googlemock/gtest/${CMAKE_STATIC_LIBRARY_PREFIX}gtest${CMAKE_STATIC_LIBRARY_SUFFIX}"
|
||||
IMPORTED_LINK_INTERFACE_LIBRARIES "${CMAKE_THREAD_LIBS_INIT}")
|
||||
set(GMock_INCLUDE_DIR ${source_dir}/include)
|
||||
set(GMock_INCLUDE_DIR ${source_dir}/googlemock/include)
|
||||
add_library(GMock STATIC IMPORTED)
|
||||
add_dependencies(GMock GMockProject)
|
||||
add_dependencies(GMock GTestProject)
|
||||
set_target_properties(GMock PROPERTIES
|
||||
IMPORTED_LOCATION "${binary_dir}/${CMAKE_STATIC_LIBRARY_PREFIX}gmock${CMAKE_STATIC_LIBRARY_SUFFIX}"
|
||||
IMPORTED_LOCATION "${binary_dir}/googlemock/${CMAKE_STATIC_LIBRARY_PREFIX}gmock${CMAKE_STATIC_LIBRARY_SUFFIX}"
|
||||
IMPORTED_LINK_INTERFACE_LIBRARIES "${CMAKE_THREAD_LIBS_INIT}")
|
||||
|
||||
ExternalProject_Add(
|
||||
|
Loading…
Reference in New Issue
Block a user