1
0
mirror of https://github.com/gnss-sdr/gnss-sdr synced 2024-12-14 04:00:34 +00:00

Fix Gtest detection

This commit is contained in:
Carles Fernandez 2019-02-07 19:45:31 +01:00
parent 3ddbef49ba
commit 627ab01707
No known key found for this signature in database
GPG Key ID: 4C583C52B0C3877D
2 changed files with 3 additions and 3 deletions

View File

@ -465,7 +465,7 @@ if(ENABLE_UNIT_TESTING OR ENABLE_SYSTEM_TESTING)
endif()
if(GTEST_DIR)
message(STATUS "Googletest root folder set at ${GTEST_DIR}")
find_path(LIBGTEST_DEV_DIR NAMES googletest/src/gtest-all.cc PATHS ${GTEST_DIR})
find_path(LIBGTEST_DEV_DIR NAMES src/gtest-all.cc PATHS ${GTEST_DIR} ${GTEST_DIR}/googletest)
if(LIBGTEST_DEV_DIR)
message(STATUS "Googletest has been found.")
else()

View File

@ -112,12 +112,12 @@ if(NOT ${GTEST_DIR_LOCAL})
else()
if(GTEST_INCLUDE_DIRS)
set(GTEST_INCLUDE_DIRECTORIES ${GTEST_INCLUDE_DIRS} ${LIBGTEST_DEV_DIR})
add_library(gtest STATIC ${LIBGTEST_DEV_DIR}/googletest/src/gtest-all.cc)
add_library(gtest STATIC ${LIBGTEST_DEV_DIR}/src/gtest-all.cc)
target_include_directories(gtest
PUBLIC
${GTEST_INCLUDE_DIRECTORIES}
)
add_library(gtest_main STATIC ${LIBGTEST_DEV_DIR}/googletest/src/gtest_main.cc)
add_library(gtest_main STATIC ${LIBGTEST_DEV_DIR}/src/gtest_main.cc)
target_include_directories(gtest_main
PUBLIC
${GTEST_INCLUDE_DIRECTORIES}