diff --git a/chapters/packages/ROOT.md b/chapters/packages/ROOT.md index 888ec5e..32077e4 100644 --- a/chapters/packages/ROOT.md +++ b/chapters/packages/ROOT.md @@ -19,17 +19,37 @@ ROOT [provides a utility](https://root.cern.ch/how/integrate-root-my-project-cma Here's what it would look like: -[import:'main', lang:'cmake'](../../examples/root-usefile/CMakeLists.txt) +[import:'core', lang:'cmake'](../../examples/root-usefile/CMakeLists.txt) ## The right way (Targets) -ROOT 6.12 and earlier do not add the include directory for imported targets. ROOT 6.14+ has corrected this error, and required target properties have been getting better. +ROOT 6.12 and earlier do not add the include directory for imported targets. ROOT 6.14+ has corrected this error, and required target properties have been getting better. This method is rapidly becoming easier to use (see the example at the end of this page for the older ROOT details). To link, just pick the libraries you want to use: [import:'add_and_link', lang:'cmake'](../../examples/root-simple/CMakeLists.txt) -If you'd like to see the default list, run `root-config --libs` on the command line. +If you'd like to see the default list, run `root-config --libs` on the command line. In Homebrew ROOT 6.18 this would be: + +* `ROOT::Core` +* `ROOT::Gpad` +* `ROOT::Graf3d` +* `ROOT::Graf` +* `ROOT::Hist` +* `ROOT::Imt` +* `ROOT::MathCore` +* `ROOT::Matrix` +* `ROOT::MultiProc` +* `ROOT::Net` +* `ROOT::Physics` +* `ROOT::Postscript` +* `ROOT::RIO` +* `ROOT::ROOTDataFrame` +* `ROOT::ROOTVecOps` +* `ROOT::Rint` +* `ROOT::Thread` +* `ROOT::TreePlayer` +* `ROOT::Tree` ## Components diff --git a/examples/root-usefile/CMakeLists.txt b/examples/root-usefile/CMakeLists.txt index 63bbe8c..3e2cf7b 100644 --- a/examples/root-usefile/CMakeLists.txt +++ b/examples/root-usefile/CMakeLists.txt @@ -6,6 +6,7 @@ project(RootUseFileExample LANGUAGES CXX) find_package(ROOT 6.16 CONFIG REQUIRED) +## [core] # Sets up global settings include("${ROOT_USE_FILE}") @@ -17,6 +18,7 @@ separate_arguments(ROOT_EXE_LINKER_FLAGS) add_executable(RootUseFileExample SimpleExample.cxx) target_link_libraries(RootUseFileExample PUBLIC ${ROOT_LIBRARIES} ${ROOT_EXE_LINKER_FLAGS}) +## [core] ## [main]