MoDeNa-EUProject/MoDeNa

MacOS problem with CMAKE_PREFIX_PATH

sigveka opened this issue · 2 comments

I am having problems compiling the framework. It seems like cmake cannot find the files.

meta:

  • cmake version 3.3.1

Executing cmake . in twoTank/src for instance yield the following error:

CMake Error at CMakeLists.txt:11 (find_package):
  By not providing "FindMODENA.cmake" in CMAKE_MODULE_PATH this project has
  asked CMake to find a package configuration file provided by "MODENA", but
  CMake did not find one.

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

    MODENAConfig.cmake
    modena-config.cmake

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


-- Configuring incomplete, errors occurred!
See also "/XXX/Documents/Git/MoDeNa/Github/MoDeNa/examples/twoTanks/src/CMakeFiles/CMakeOutput.log".

I tried adding the path explicitly:

cmake  -DCMAKE_PREFIX_PATH=${HOME}/lib/cmake/modena/ .

The result is yet another error:

CMake Error at /Users/XXXX/Documents/Git/MoDeNa/Github/MoDeNa/src/src/MODENAConfig.cmake:5 (find_package):
  By not providing "FindLTDL.cmake" in CMAKE_MODULE_PATH this project has
  asked CMake to find a package configuration file provided by "LTDL", but
  CMake did not find one.

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

    LTDLConfig.cmake
    ltdl-config.cmake

  Add the installation prefix of "LTDL" to CMAKE_PREFIX_PATH or set
  "LTDL_DIR" to a directory containing one of the above files.  If "LTDL"
  provides a separate development package or SDK, be sure it has been
  installed.
Call Stack (most recent call first):
  CMakeLists.txt:11 (find_package)


-- Configuring incomplete, errors occurred!
See also "/Users/XXXX/Documents/Git/MoDeNa/Github/MoDeNa/examples/twoTanks/src/CMakeFiles/CMakeOutput.log".

Any idea of what the problem might be?

The second issue is probably due to a missing library. Did you install the equivalent of libltdl-dev and libltdl7?

libltdl-dev equivalent on mac is installed as libtool, e.g. using mac ports:

sudo port install libtool

I already had that installed, but for some reason it now works. Note that the only difference between the command below and the one I used earlier is the "backslash" at the end of ~/lib/cmake/modena. I did not think that would matter, but maybe it does.

cmake -DCMAKE_PREFIX_PATH="~/lib/cmake/modena" .