Your “CMakelists.txt” file does not use ROOT at all:
-
Some Geant4 examples use ROOT, so you can look there.
-
An additional example: GitHub - eguiraud/root-readspeed: A tool to measure what throughput can be expected from ROOT for a given application
BTW. You need to have ROOT and Geant4 built so that they all use the same C++ standard (i.e., C++11
or C++14
or C++17
): ROOT Forum → Search → Geant4 C++ standard