Describe the solution you'd like
use cmake_dependent_option to have the fire_USE_ROOT option only available if ROOT is found.
Describe alternatives you've considered
Current solution is best known alternative I believe.
Additional context
Found while parsing EUDAQ's cmake infrastructre
include(CMakeDependentOption)
find_package(Qt5Widgets CONFIG)
cmake_dependent_option(EUDAQ_BUILD_GUI "Compile GUI executables (requires QT5)" ON
"Qt5Widgets_FOUND" OFF)
if(NOT EUDAQ_BUILD_GUI)
message(STATUS "GUIs of executables (euRun, euLog) are NOT to be built (EUDAQ_BUILD_GUI=OFF)")
return()
endif()
message(STATUS "GUIs of executables (euRun, euLog) are to be built (EUDAQ_BUILD_GUI=ON)")
Describe the solution you'd like use
cmake_dependent_option
to have thefire_USE_ROOT
option only available ifROOT
is found.Describe alternatives you've considered Current solution is best known alternative I believe.
Additional context Found while parsing EUDAQ's cmake infrastructre