'CMake error where root directory (I think maybe source?) does not exist

Here is a screenshot of the issues I'm having. I'm trying to set up geant4 so I can use g4beamline to run some physics simulations and I've hit a dead end.

Image

I'm following the instructions in the "BUILD.txt" file that came along with it, and the code I try / error I get is the following:

sudo cmake -DCMAKE_INSTALL_PREFIX=$HOME/geant4.10.05 -DBUILD_SHARED_LIBS=OFF -DBUILD_STATIC_LIBS=ON -DGEANT4_USE_SYSTEM_EXPAT=OFF -DCMAKE_BUILD_TYPE=Release -DGEANT4_USE_RAYTRACER_X11=ON -DGEANT4_USE_OPENGL_X11=ON -DGEANT4_USE_QT=ON  .

which returns

-- G4BLVERSION=3.06
-- 
-- G4BL_VISUAL=ON
-- G4BL_GUI=ON
-- G4BL_ROOT=ON
-- G4BL_GSL=ON
-- G4BL_FFTW=ON
-- G4BL_MPI=OFF
-- GEANT4_DIR=
CMake Error at CMakeLists.txt:94 (message):
  ROOT_DIR= does not exist

-- Configuring incomplete, errors occurred!
See also "/home/cyrus/geant4.10.05/build/CMakeFiles/CMakeOutput.log".

As far as fixes, I've never tried used CMake before so building via this method is very new to me. I tried different variations (read: simpler) that I found here: cmake error "CMake Error: The source directory ".../p4c/build/[-DCMAKE_BUILD_TYPE=RELEASE" does not exist. I've tried a few other solutions I found on stackoverflow, but nothing has worked so far. Also I've tried changing the filepath in the environment variables, but those are also new to me. I reset everything to the default as it was when I first tried, but I'm out of ideas. I'm trying this on Ubuntu 20.04. I'm not sure what other details to include, but I would be happy to provide any more info / try any suggestions



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source