1
0
mirror of synced 2024-11-11 15:38:54 +01:00
modern-cmake/examples/root-simple-3.11/CMakeLists.txt

23 lines
610 B
CMake
Raw Normal View History

2018-03-29 13:26:47 +02:00
## [main]
2018-03-29 12:27:23 +02:00
cmake_minimum_required(VERSION 3.11)
project(RootSimpleExample311 LANGUAGES CXX)
find_package(ROOT CONFIG REQUIRED)
message(STATUS "Found ROOT: ${ROOT_VERSION} at ${ROOT_DIR}")
2018-03-29 19:30:00 +02:00
seperate_arguments(ROOT_CXX_FLAGS)
2018-03-29 12:27:23 +02:00
## [modern_fix]
target_include_directories(ROOT::Core INTERFACE "${ROOT_INCLUDE_DIRS}")
2018-03-29 19:30:00 +02:00
target_compile_options(ROOT::Core INTERFACE "${ROOT_CXX_FLAGS}")
2018-03-29 12:27:23 +02:00
## [modern_fix]
add_executable(RootSimpleExample311 SimpleExample.cxx)
target_link_libraries(RootSimpleExample311 PUBLIC ROOT::Physics)
2018-03-29 13:26:47 +02:00
## [main]
2018-03-29 12:27:23 +02:00
enable_testing()
add_test(NAME RootSimpleExample311 COMMAND RootSimpleExample311)