CMake does not find module, though it's in MODULE_PATH

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

CMake does not find module, though it's in MODULE_PATH

Florian Lindner
Hello,

my CMake 3.6.2 complains about not finding FindEigen3.cmake

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

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

    Eigen3Config.cmake
    eigen3-config.cmake

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

However, it's clearly there in ls $CMAKE_MODULE_PATH/FindEigen3.cmake

I try to use it like find_package(Eigen3 REQUIRED)

What else could be wrong there?

Thanks!

Florian
--

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
https://cmake.org/mailman/listinfo/cmake
Reply | Threaded
Open this post in threaded view
|

Re: CMake does not find module, though it's in MODULE_PATH

Andreas Naumann
Dear Florian,
 
please note, that CMake expects the variable CMAKE_MODULE_PATH not as an environment variable, but as a CMake variable. So, you could do something like
set(CMAKE_MODULE_PATH $ENV{CMAKE_MODULE_PATH})
before calling find_package(Eigen3)
 
But there are other ways, according to stackoverflow https://stackoverflow.com/questions/12249140/find-package-eigen3-for-cmake .
 
Regards,
Andreas
 
Gesendet: Montag, 07. Mai 2018 um 11:28 Uhr
Von: "Florian Lindner" <[hidden email]>
An: "[hidden email]" <[hidden email]>
Betreff: [CMake] CMake does not find module, though it's in MODULE_PATH
Hello,

my CMake 3.6.2 complains about not finding FindEigen3.cmake

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

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

Eigen3Config.cmake
eigen3-config.cmake

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

However, it's clearly there in ls $CMAKE_MODULE_PATH/FindEigen3.cmake

I try to use it like find_package(Eigen3 REQUIRED)

What else could be wrong there?

Thanks!

Florian
--

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
https://cmake.org/mailman/listinfo/cmake

--

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
https://cmake.org/mailman/listinfo/cmake