List targets
This commit is contained in:
parent
b7d24d1a22
commit
674c784bf0
|
@ -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:
|
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)
|
## 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:
|
To link, just pick the libraries you want to use:
|
||||||
|
|
||||||
[import:'add_and_link', lang:'cmake'](../../examples/root-simple/CMakeLists.txt)
|
[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
|
## Components
|
||||||
|
|
||||||
|
|
|
@ -6,6 +6,7 @@ project(RootUseFileExample LANGUAGES CXX)
|
||||||
|
|
||||||
find_package(ROOT 6.16 CONFIG REQUIRED)
|
find_package(ROOT 6.16 CONFIG REQUIRED)
|
||||||
|
|
||||||
|
## [core]
|
||||||
# Sets up global settings
|
# Sets up global settings
|
||||||
include("${ROOT_USE_FILE}")
|
include("${ROOT_USE_FILE}")
|
||||||
|
|
||||||
|
@ -17,6 +18,7 @@ separate_arguments(ROOT_EXE_LINKER_FLAGS)
|
||||||
|
|
||||||
add_executable(RootUseFileExample SimpleExample.cxx)
|
add_executable(RootUseFileExample SimpleExample.cxx)
|
||||||
target_link_libraries(RootUseFileExample PUBLIC ${ROOT_LIBRARIES} ${ROOT_EXE_LINKER_FLAGS})
|
target_link_libraries(RootUseFileExample PUBLIC ${ROOT_LIBRARIES} ${ROOT_EXE_LINKER_FLAGS})
|
||||||
|
## [core]
|
||||||
|
|
||||||
## [main]
|
## [main]
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue