1
0
mirror of synced 2024-12-22 12:40:00 +01:00

List targets

This commit is contained in:
Henry Schreiner 2019-08-08 17:10:25 -04:00
parent b7d24d1a22
commit 674c784bf0
2 changed files with 25 additions and 3 deletions

View File

@ -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

View File

@ -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]