Integrate ROOT into my project with CMake

I have installed root with cmake. When the installation was complete, I removed the source directory.

Now, I’m trying to integrate ROOT in my project with CMake. I’m following the steps in

It does not work because I removed the ROOT sources. I get

-- Found ROOT libraries in /home/adrian/Soft/root-6.14.06/lib
-- ROOT libraries: /home/adrian/Soft/root-6.14.06/lib/;/home/adrian/Soft/root-6.14.06/lib/;/home/adrian/Soft/root-6.14.06/lib/;/home/adrian/Soft/root-6.14.06/lib/;/home/adrian/Soft/root-6.14.06/lib/;/home/adrian/Soft/root-6.14.06/lib/;
CMake Error at /home/adrian/Soft/root-6.14.06/ROOTUseFile.cmake:4 (include):
  include could not find load file:

Call Stack (most recent call first):
  src/CMakeLists.txt:15 (include)

If I keep the root source files, I can build my project just fine.

How can I decouple my project from the original ROOT source files. It must be possible to refer to the ROOT install directory, right?

Thank you for your help.

Please read tips for efficient and successful posting and posting code

ROOT Version: 6.14.06
Platform: ubuntu
Compiler: gcc 7.4.0

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.