1

I installed a software package using CMake, on a customized location, with the command line below

cmake .. -DCMAKE_INSTALL_PREFIX=../install

Now CMake can no more find the package with the find_package. The error message suggests me to specify either CMAKE_MODULE_PATH or CMAKE_PREFIX_PATH.

I tried to specify the installation path using

 cmake .. -DCMAKE_MODULE_PATH=../install

It did not work. But the following worked:

 cmake .. -DCMAKE_PREFIX_PATH=../install

Question: In general, what would be the sound and reliable way to specify the path for "find_package" to work correctly for finding a package installed to a user-specified location?

tanius
  • 14,003
  • 3
  • 51
  • 63
zell
  • 9,830
  • 10
  • 62
  • 115
  • 1
    Have you checked [that question](https://stackoverflow.com/questions/34795816/) and my answer for it? – Tsyvarev Dec 03 '19 at 15:28

0 Answers0