diff --git a/CMakeLists.txt b/CMakeLists.txt index 2ea704f62..3123aa9d2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1098,6 +1098,32 @@ if(NOT MATIO_FOUND) find_package(ZLIB) if(ZLIB_FOUND) get_filename_component(ZLIB_BASE_DIR ${ZLIB_INCLUDE_DIRS} DIRECTORY) + if(OS_IS_LINUX) + if(NOT EXISTS "/usr/bin/libtoolize") + message(" libtool has not been found.") + message(" You can try to install it by typing:") + if(${LINUX_DISTRIBUTION} MATCHES "Fedora" OR ${LINUX_DISTRIBUTION} MATCHES "Red Hat") + message(" sudo yum groupinstall 'Development Tools'") + elseif(${LINUX_DISTRIBUTION} MATCHES "openSUSE") + message(" sudo zypper install libtoool") + else(${LINUX_DISTRIBUTION} MATCHES "Fedora" OR ${LINUX_DISTRIBUTION} MATCHES "Red Hat") + message(" sudo apt-get install libtool") + endif(${LINUX_DISTRIBUTION} MATCHES "Fedora" OR ${LINUX_DISTRIBUTION} MATCHES "Red Hat") + message(FATAL_ERROR "libtool is required to build matio from source") + endif(NOT EXISTS "/usr/bin/libtoolize") + if(NOT EXISTS "/usr/bin/aclocal-1.15" OR EXISTS "/usr/bin/aclocal-1.14" OR EXISTS "/usr/bin/aclocal-1.13" OR EXISTS "/usr/bin/aclocal-1.11" OR EXISTS "/usr/bin/aclocal-1.10") + message(" aclocal has not been found.") + message(" You can try to install it by typing:") + if(${LINUX_DISTRIBUTION} MATCHES "Fedora" OR ${LINUX_DISTRIBUTION} MATCHES "Red Hat") + message(" sudo yum groupinstall 'Development Tools'") + elseif(${LINUX_DISTRIBUTION} MATCHES "openSUSE") + message(" sudo zypper install automake") + else(${LINUX_DISTRIBUTION} MATCHES "Fedora" OR ${LINUX_DISTRIBUTION} MATCHES "Red Hat") + message(" sudo apt-get install automake") + endif(${LINUX_DISTRIBUTION} MATCHES "Fedora" OR ${LINUX_DISTRIBUTION} MATCHES "Red Hat") + message(FATAL_ERROR "aclocal is required to build matio from source") + endif(NOT EXISTS "/usr/bin/aclocal-1.15" OR EXISTS "/usr/bin/aclocal-1.14" OR EXISTS "/usr/bin/aclocal-1.13" OR EXISTS "/usr/bin/aclocal-1.11" OR EXISTS "/usr/bin/aclocal-1.10") + endif(OS_IS_LINUX) find_package(HDF5) if(HDF5_FOUND) list(GET HDF5_LIBRARIES 0 HDF5_FIRST_DIR) diff --git a/src/tests/unit-tests/signal-processing-blocks/libs/CMakeLists.txt b/src/tests/unit-tests/signal-processing-blocks/libs/CMakeLists.txt index ee71cc113..3f19c0854 100644 --- a/src/tests/unit-tests/signal-processing-blocks/libs/CMakeLists.txt +++ b/src/tests/unit-tests/signal-processing-blocks/libs/CMakeLists.txt @@ -39,3 +39,6 @@ list(SORT SIGNAL_PROCESSING_TESTING_LIB_HEADERS) add_library(signal_processing_testing_lib ${SIGNAL_PROCESSING_TESTING_LIB_SOURCES} ${SIGNAL_PROCESSING_TESTING_LIB_HEADERS}) source_group(Headers FILES ${SIGNAL_PROCESSING_TESTING_LIB_HEADERS}) +if(NOT MATIO_FOUND) + add_dependencies(signal_processing_testing_lib matio-${GNSSSDR_MATIO_LOCAL_VERSION}) +endif(NOT MATIO_FOUND) \ No newline at end of file