diff --git a/CMakeLists.txt b/CMakeLists.txt
index 8e383aca036f4d141b3a63b9c0de695438c76b12..198634c6c1f701dbe2c6d330e98f236f74b8a506 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -71,8 +71,9 @@ list(PREPEND CMAKE_PREFIX_PATH ${SIMPATH})
 find_package(ROOT 6.22 CONFIG REQUIRED)
 if(ROOT_FOUND)
   Message("Root was found")
-  set(ROOT_CINT_EXECUTABLE ${SIMPATH}/bin/rootcling)
-  set(ROOT_CONFIG_EXECUTABLE ${SIMPATH}/bin/root-config)
+  # The following CMake variables are needed until the modernization is done 
+  set(ROOT_CINT_EXECUTABLE ${ROOT_BINDIR}/rootcling)
+  set(ROOT_CONFIG_EXECUTABLE ${ROOT_BINDIR}/root-config)
   set(ROOT_INCLUDE_DIR ${ROOT_INCLUDE_DIRS})
 endif()
 
diff --git a/core/CMakeLists.txt b/core/CMakeLists.txt
index 0147239fcc97ee7591729cb14d13475358cefb51..ab46e91eb57a61a7a85cdabc1a82bf19387ac598 100644
--- a/core/CMakeLists.txt
+++ b/core/CMakeLists.txt
@@ -14,13 +14,8 @@ add_subdirectory(detectors/tof)
 add_subdirectory(detectors/sts)
 add_subdirectory(detectors/psd)
 
-Execute_Process(COMMAND ${ROOT_CONFIG_EXECUTABLE} --has-opengl
-                OUTPUT_VARIABLE EveIsBuild
-                OUTPUT_STRIP_TRAILING_WHITESPACE
-               )
-
-If(${EveIsBuild} STREQUAL yes)
-  Message(STATUS "Build the eventdisplay.")
+If(ROOT_opengl_FOUND)
+  Message(STATUS "OpenGL support found. Build the eventdisplay.")
   add_subdirectory (eventdisplay)
 Else()
   Message(STATUS "The eventdisplay is not build, there is no OpenGL support.")