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