Skip to content

Commit

Permalink
cmake: Switch ROOT to config mode
Browse files Browse the repository at this point in the history
Instead of using the internal find module, let's use ROOT's
own cmake config mode system.
  • Loading branch information
ChristianTackeGSI authored and dennisklein committed Apr 13, 2021
1 parent 4a09e58 commit 764b2c6
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 201 deletions.
11 changes: 10 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,16 @@ if(SIMPATH)
endif()

# FairRoot only supports ROOT6, so check which version is available
find_package2(PUBLIC ROOT VERSION 6.10.00 REQUIRED)
list(APPEND required_root_components RIO)
if(BUILD_SIM)
list(APPEND required_root_components pythia6 pythia8)
endif()
list(APPEND optional_root_components opengl)
list(APPEND optional_root_components gdml vmc)
find_package2(PUBLIC ROOT REQUIRED
VERSION 6.18.00
COMPONENTS ${required_root_components}
OPTIONAL_COMPONENTS ${optional_root_components})
include(ROOTMacros)
if(ROOT_vmc_FOUND)
set(VMCLIB ROOT::VMC)
Expand Down
2 changes: 1 addition & 1 deletion cmake/modules/FairRootTargetRootDictionary.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ function(fairroot_target_root_dictionary target)
OUTPUT ${dictionaryFile} ${pcmFile} ${rootmapFile}
VERBATIM
COMMAND ${CMAKE_COMMAND} -E env "LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:$ENV{LD_LIBRARY_PATH}"
${ROOT_CINT_EXECUTABLE}
$<TARGET_FILE:ROOT::rootcling>
-f ${dictionaryFile}
-inlineInputHeader
-rmf ${rootmapFile}
Expand Down
199 changes: 0 additions & 199 deletions cmake/modules/FindROOT.cmake

This file was deleted.

0 comments on commit 764b2c6

Please sign in to comment.