Fix configuration and building when matio is not present

This commit is contained in:
Carles Fernandez 2018-02-23 23:46:16 +01:00
parent b26e63e753
commit 59e49a5eba
2 changed files with 29 additions and 0 deletions

View File

@ -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)

View File

@ -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)