diff --git a/DDEve/CMakeLists.txt b/DDEve/CMakeLists.txt index 9f865d1d273c9bbc9b1fc6cb9bcd9b0740b849b9..7b27cecc8885e7418308b643a116b74a5c3a5d9d 100644 --- a/DDEve/CMakeLists.txt +++ b/DDEve/CMakeLists.txt @@ -17,7 +17,12 @@ target_include_directories(DDEve_Interface $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include> $<INSTALL_INTERFACE:include> ) + target_link_libraries(DDEve_Interface INTERFACE ROOT::Core ROOT::Rint ROOT::Eve ROOT::Gui ROOT::Graf3d ROOT::RGL ROOT::EG) +if(ROOT_VERSION VERSION_GREATER_EQUAL 6.27.00) + target_link_libraries(DDEve_Interface INTERFACE ROOT::ROOTGeomViewer) +endif() + dd4hep_add_dictionary(G__DDEve SOURCES ../DDCore/include/ROOT/Warnings.h include/DDEve/*.h diff --git a/DDEve/root7/WebDisplay.cpp b/DDEve/root7/WebDisplay.cpp index 065036bb841e6912b7e5be5b51f88a31d7b676c4..27975f98f6b8820b07eb264a8c3869776aad0516 100644 --- a/DDEve/root7/WebDisplay.cpp +++ b/DDEve/root7/WebDisplay.cpp @@ -17,8 +17,13 @@ // ROOT includes #include "ROOT/RDirectory.hxx" +#if ROOT_VERSION_CODE >= ROOT_VERSION(6,27,00) +#include "ROOT/RGeomViewer.hxx" +using GEOM_VIEWER = ROOT::Experimental::RGeomViewer; +#else #include "ROOT/REveGeomViewer.hxx" - +using GEOM_VIEWER = ROOT::Experimental::REveGeomViewer; +#endif // C/C++ include files #include <cerrno> @@ -76,7 +81,7 @@ static long webdisplay(Detector& description, int argc, char** argv) { } if (vol) { - auto viewer = std::make_shared<ROOT::Experimental::REveGeomViewer>(&mgr); + auto viewer = std::make_shared<GEOM_VIEWER>(&mgr); viewer->SelectVolume(vol->GetName()); viewer->SetLimits(); viewer->SetDrawOptions(opt);