From 702257e678703e46c167d3c126c64a5f198d3c3f Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Sat, 24 Feb 2018 00:40:31 +0100 Subject: [PATCH] Fix building if matio was not installed in the system --- src/tests/CMakeLists.txt | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/tests/CMakeLists.txt b/src/tests/CMakeLists.txt index ecc45fb8e..2994eb0c4 100644 --- a/src/tests/CMakeLists.txt +++ b/src/tests/CMakeLists.txt @@ -711,9 +711,17 @@ target_link_libraries(matio_test ${Boost_LIBRARIES} gnss_system_parameters ) add_test(matio_test matio_test) if(NOT ${GTEST_DIR_LOCAL}) - add_dependencies(matio_test gtest-${GNSSSDR_GTEST_LOCAL_VERSION}) + if(MATIO_FOUND) + add_dependencies(matio_test gtest-${GNSSSDR_GTEST_LOCAL_VERSION}) + else(MATIO_FOUND) + add_dependencies(matio_test gtest-${GNSSSDR_GTEST_LOCAL_VERSION} matio-${GNSSSDR_MATIO_LOCAL_VERSION}) + endif(MATIO_FOUND) else(NOT ${GTEST_DIR_LOCAL}) - add_dependencies(matio_test gtest) + if(MATIO_FOUND) + add_dependencies(matio_test gtest) + else(MATIO_FOUND) + add_dependencies(matio_test gtest matio-${GNSSSDR_MATIO_LOCAL_VERSION}) + endif(MATIO_FOUND) endif(NOT ${GTEST_DIR_LOCAL}) add_executable(acq_test