Problem with CMake and FairRunAna

Good morning,

Please, I tried to add root to my Cmake( I have attached my CMakeLists.txt). I am new to CMake and root as well. I want to include FairRunAna in my main.cpp file, but I get this error when building my cmake. Please how I can solve this. Thank you very much.

harriet@harriet-ROG-Zephyrus-G15-GA503RM-GA503RM:~/kalman filter/OpenKF/build$ cmake ../
-- The C compiler identification is GNU 11.4.0
-- The CXX compiler identification is GNU 11.4.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
CMake Error at CMakeLists.txt:47 (target_link_libraries):
  Cannot specify link libraries for target
  "/home/harriet/root/root-6.28.04/root-install/lib/libCore.so" which is not
  built by this project.


-- Configuring incomplete, errors occurred!
See also "/home/harriet/kalman filter/OpenKF/build/CMakeFiles/CMakeOutput.log".

_ROOT Version:root-6.28.04
_Platform: Ubuntu 22.04.3 LTS
_Compiler: c++


CMakeLists.txt (1.9 KB)
main.cpp (6.5 KB)

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