mirror of
1
0
Fork 0
modern-cmake/examples/root-simple/CMakeLists.txt

21 lines
506 B
CMake
Raw Normal View History

2018-03-28 22:48:45 +02:00
## [main]
2019-11-26 19:52:10 +01:00
cmake_minimum_required(VERSION 3.1...3.16)
2018-03-28 20:50:38 +02:00
2018-03-28 22:48:45 +02:00
project(RootSimpleExample LANGUAGES CXX)
2018-03-28 20:50:38 +02:00
2019-08-08 22:18:42 +02:00
# Finding the ROOT package
2018-03-28 22:48:45 +02:00
## [find_package]
2019-08-08 22:18:42 +02:00
find_package(ROOT 6.16 CONFIG REQUIRED)
2018-03-28 22:48:45 +02:00
## [find_package]
2018-03-28 20:50:38 +02:00
2019-08-08 22:18:42 +02:00
# Adding an executable program and linking to needed ROOT libraries
2018-03-28 22:48:45 +02:00
## [add_and_link]
2018-03-29 12:27:23 +02:00
add_executable(RootSimpleExample SimpleExample.cxx)
2019-08-08 22:18:42 +02:00
target_link_libraries(RootSimpleExample PUBLIC ROOT::Physics)
2018-03-28 22:48:45 +02:00
## [add_and_link]
## [main]
2018-03-28 20:50:38 +02:00
enable_testing()
2018-03-29 12:27:23 +02:00
add_test(NAME RootSimpleExample COMMAND RootSimpleExample)