mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2025-01-16 20:23:02 +00:00
fixing detection and use of libgtest-dev
This commit is contained in:
parent
ea05e8eb90
commit
fae3aa4f19
@ -24,17 +24,17 @@ if(GTEST_DIR)
|
||||
set(GTEST_DIR_LOCAL ${GTEST_DIR})
|
||||
endif(GTEST_DIR)
|
||||
if(NOT GTEST_DIR_LOCAL)
|
||||
set(GTEST_DIR_LOCAL false CACHE STRING "Gtest downloaded and built automatically")
|
||||
set(GTEST_DIR_LOCAL false)
|
||||
else()
|
||||
set(GTEST_DIR_LOCAL true CACHE STRING "Gtest already downloaded")
|
||||
set(GTEST_DIR_LOCAL true)
|
||||
endif(NOT GTEST_DIR_LOCAL)
|
||||
find_path(GTEST_INCLUDE_DIRS NAMES gtest/gtest.h
|
||||
PATHS /usr/include)
|
||||
if(GTEST_INCLUDE_DIRS)
|
||||
set(GTEST_DIR_LOCAL true CACHE STRING "Gtest already downloaded")
|
||||
set(GTEST_DIR_LOCAL true)
|
||||
endif(GTEST_INCLUDE_DIRS)
|
||||
|
||||
if(NOT GTEST_DIR_LOCAL)
|
||||
if(NOT ${GTEST_DIR_LOCAL})
|
||||
# if GTEST_DIR is not defined, we download and build it
|
||||
set(gtest_RELEASE 1.7.0)
|
||||
if(OS_IS_MACOSX)
|
||||
@ -84,7 +84,7 @@ if(NOT GTEST_DIR_LOCAL)
|
||||
${binary_dir}/${CMAKE_FIND_LIBRARY_PREFIXES}gtest_main.a
|
||||
)
|
||||
set(GTEST_LIB_DIR "${CMAKE_CURRENT_BINARY_DIR}/../../gtest-${gtest_RELEASE}")
|
||||
else(NOT GTEST_DIR_LOCAL)
|
||||
else(NOT ${GTEST_DIR_LOCAL})
|
||||
if(GTEST_INCLUDE_DIRS)
|
||||
find_path(GTEST_SOURCE_DIR NAMES gtest-all.cc
|
||||
PATHS /usr/src/gtest/src)
|
||||
@ -98,7 +98,7 @@ else(NOT GTEST_DIR_LOCAL)
|
||||
add_library(gtest ${GTEST_DIR}/src/gtest-all.cc ${GTEST_DIR}/src/gtest_main.cc)
|
||||
set(GTEST_LIBRARIES gtest)
|
||||
endif(GTEST_INCLUDE_DIRS)
|
||||
endif(NOT GTEST_DIR_LOCAL)
|
||||
endif(NOT ${GTEST_DIR_LOCAL})
|
||||
|
||||
|
||||
set(GNSS_SDR_TEST_OPTIONAL_LIBS "")
|
||||
|
Loading…
Reference in New Issue
Block a user