geant4-v11.2.1
Ubuntu 22.04
GCC 11.4.0
cmake version 3.29.0
Having error with cmake not being able to identify some files
CMake Error at B1/CMakeLists.txt:15 (find_package):
By not providing "FindGeant4.cmake" in CMAKE_MODULE_PATH this project has
asked CMake to find a package configuration file provided by "Geant4", but
CMake did not find one.
Could not find a package configuration file provided by "Geant4" with any
of the following names:
Geant4Config.cmake
geant4-config.cmake
Add the installation prefix of "Geant4" to CMAKE_PREFIX_PATH or set
"Geant4_DIR" to a directory containing one of the above files. If "Geant4"
provides a separate development package or SDK, be sure it has been
installed.
I also suggest add the following line to your .bashrc so that you can use g4cmake to compile Geant4 project instead of typing the long cmake command mentioned above.
alias g4cmake='cmake -DGeant4_DIR=${your Geant4 installation path}/lib/cmake/Geant4'
Hi,
geant4 has configuration file.
Before tried cmake configuration which any example or you own geant4 application you need
sources ${your Geant4 installation path}/bin/geant4.sh
or geant4.csh depending on shell you are using.
This must be done ones when you open new terminal or tab.