CMake : ROOTConfig.cmake installation location

Hello,

When compiling and installing ROOT with CMake, the file ROOTConfig.cmake (et al.) is installed in /cmake. It means that a software compiled with CMake and depending on ROOT can’t simply do

find_package(ROOT) as it won’t find the config files in the CMake modules search path. Of course one can modify CMAKE_MODULE_PATH. Still it is not said so in the slides presented during the Workshop and it means that you have to know where root is.

What about installing ROOTConfig.cmake and other related files in /usr/share/cmake/Modules ?
What is the standard way of doing ?

Thank you
Barth

hum… actually it works.

If I install in, let’s say, /opt, then my program can find the config in /opt/root/cmake.
I presume that it is because /opt/root/bin is in PATH and /opt/root/lib in LD_LIBRARY_PATH. What do you think ?

Anyway, it works, so no problem :slight_smile:
Barth