ROOT 项目的最小 CMakeLists.txt
这是在 CMake 项目中使用 ROOT 库的最小 CMake 示例。
CMakeLists.txt
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)If this post helped you, please consider buying me a coffee or donating via PayPal to support research & publishing of new posts on TechOverflow