aheit / cantools

GNU General Public License v3.0
56 stars 29 forks source link

cmake .. fails #15

Closed burra closed 7 months ago

burra commented 7 months ago

My build fails with the following issue on Ubuntu 22.04

-- The C compiler identification is GNU 11.4.0
-- The CXX compiler identification is GNU 11.4.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Looking for 4 include files stdlib.h, ..., float.h
-- Looking for 4 include files stdlib.h, ..., float.h - found
-- Looking for inttypes.h
-- Looking for inttypes.h - found
-- Looking for stdint.h
-- Looking for stdint.h - found
-- Looking for unistd.h
-- Looking for unistd.h - found
-- Dmalloc disabled
-- Looking for sys/types.h
-- Looking for sys/types.h - found
-- Looking for stddef.h
-- Looking for stddef.h - found
-- Check size of unsigned long long int
-- Check size of unsigned long long int - done
Byte order: LITTLE_ENDIAN
-- Performing Test HAVE_ARITHMETIC_RSHIFT
-- Performing Test HAVE_ARITHMETIC_RSHIFT - Success
-- Looking for LINE_MAX
-- Looking for LINE_MAX - found
-- Found FLEX: /usr/bin/flex (found version "2.6.4")
-- Found BISON: /usr/bin/bison (found version "3.8.2")
-- Found ZLIB: /usr/lib/x86_64-linux-gnu/libz.so (found version "1.2.11")
CMake Error at CMakeLists.txt:82 (find_package):
  By not providing "FindMatio.cmake" in CMAKE_MODULE_PATH this project has
  asked CMake to find a package configuration file provided by "Matio", but
  CMake did not find one.

  Could not find a package configuration file provided by "Matio" with any of
  the following names:

    MatioConfig.cmake
    matio-config.cmake

  Add the installation prefix of "Matio" to CMAKE_PREFIX_PATH or set
  "Matio_DIR" to a directory containing one of the above files.  If "Matio"
  provides a separate development package or SDK, be sure it has been
  installed.

-- Configuring incomplete, errors occurred!
aheit commented 7 months ago

Hi Burra,

thanks for reporting. It seems that the matio linux package doesn't provide a cmake config. However, it contains a .pc file, so changed CMakeLists.txt to use that instead. The change adds one more package dependency: pkg-config.

I just pushed the change to github. Please check if it works for you.

Regards, Andreas

burra commented 7 months ago

The build works now, thanks