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:
parent
3ddbef49ba
commit
627ab01707
@ -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()
|
||||
|
@ -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}
|
||||
|
Loading…
Reference in New Issue
Block a user