Minimal CMakeLists.txt for ROOT projects
This is a minimal CMake example for using the ROOT libraries in a CMake project.
cmake_minimum_required(VERSION 3.10)
# Define the project name
project(myprogram)
# Find the required packages
find_package(ROOT REQUIRED)
# Add the executable target
add_executable(myprogram main.cpp)
target_include_directories(myprogram PUBLIC ${ROOT_INCLUDE_DIRS})
# Link the necessary libraries
target_link_libraries(myprogram ${ROOT_LIBRARIES} zmq)