Dear experts
I’m new with CMake, I wrote one .cxx and .hxx file and the .hxx contains like:
#include <TFile.h>
And in my CMakeLists.txt it’s like:
cmake_minimum_required(VERSION 3.3 FATAL_ERROR)
project(CRTTracking)
set(CMAKE_CXX_STANDARD 14)
find_package(ROOT REQUIRED)
add_executable(CRTTracking ${CMAKE_CURRENT_SOURCE_DIR}/src/CRTTracking.cxx)
target_include_directories(CRTTracking PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/src)
target_link_libraries(CRTTracking ${ROOT_LIBRARIES})
install(TARGETS CRTTracking
DESTINATION ${CMAKE_CURRENT_SOURCE_DIR}/bin)
But when I make the files the error occurred:
In file included from /Users/siyuan/Physics/comet/crt/tracking/src/CRTTracking.cxx:1:
/Users/siyuan/Physics/comet/crt/tracking/src/CRTTracking.hxx:4:10: fatal error: 'TFile.h' file not found
#include <TFile.h>
What did I do wrong in CMakeLists.txt?
Please read tips for efficient and successful posting and posting code
ROOT Version: Not Provided
Platform: Not Provided
Compiler: Not Provided