Geant4 Cross Reference

Cross-Referencing   Geant4
Geant4/cmake/Templates/Geant4Config.cmake.in

Version: [ ReleaseNotes ] [ 1.0 ] [ 1.1 ] [ 2.0 ] [ 3.0 ] [ 3.1 ] [ 3.2 ] [ 4.0 ] [ 4.0.p1 ] [ 4.0.p2 ] [ 4.1 ] [ 4.1.p1 ] [ 5.0 ] [ 5.0.p1 ] [ 5.1 ] [ 5.1.p1 ] [ 5.2 ] [ 5.2.p1 ] [ 5.2.p2 ] [ 6.0 ] [ 6.0.p1 ] [ 6.1 ] [ 6.2 ] [ 6.2.p1 ] [ 6.2.p2 ] [ 7.0 ] [ 7.0.p1 ] [ 7.1 ] [ 7.1.p1 ] [ 8.0 ] [ 8.0.p1 ] [ 8.1 ] [ 8.1.p1 ] [ 8.1.p2 ] [ 8.2 ] [ 8.2.p1 ] [ 8.3 ] [ 8.3.p1 ] [ 8.3.p2 ] [ 9.0 ] [ 9.0.p1 ] [ 9.0.p2 ] [ 9.1 ] [ 9.1.p1 ] [ 9.1.p2 ] [ 9.1.p3 ] [ 9.2 ] [ 9.2.p1 ] [ 9.2.p2 ] [ 9.2.p3 ] [ 9.2.p4 ] [ 9.3 ] [ 9.3.p1 ] [ 9.3.p2 ] [ 9.4 ] [ 9.4.p1 ] [ 9.4.p2 ] [ 9.4.p3 ] [ 9.4.p4 ] [ 9.5 ] [ 9.5.p1 ] [ 9.5.p2 ] [ 9.6 ] [ 9.6.p1 ] [ 9.6.p2 ] [ 9.6.p3 ] [ 9.6.p4 ] [ 10.0 ] [ 10.0.p1 ] [ 10.0.p2 ] [ 10.0.p3 ] [ 10.0.p4 ] [ 10.1 ] [ 10.1.p1 ] [ 10.1.p2 ] [ 10.1.p3 ] [ 10.2 ] [ 10.2.p1 ] [ 10.2.p2 ] [ 10.2.p3 ] [ 10.3 ] [ 10.3.p1 ] [ 10.3.p2 ] [ 10.3.p3 ] [ 10.4 ] [ 10.4.p1 ] [ 10.4.p2 ] [ 10.4.p3 ] [ 10.5 ] [ 10.5.p1 ] [ 10.6 ] [ 10.6.p1 ] [ 10.6.p2 ] [ 10.6.p3 ] [ 10.7 ] [ 10.7.p1 ] [ 10.7.p2 ] [ 10.7.p3 ] [ 10.7.p4 ] [ 11.0 ] [ 11.0.p1 ] [ 11.0.p2 ] [ 11.0.p3, ] [ 11.0.p4 ] [ 11.1 ] [ 11.1.1 ] [ 11.1.2 ] [ 11.1.3 ] [ 11.2 ] [ 11.2.1 ] [ 11.2.2 ] [ 11.3.0 ]

Diff markup

Differences between /cmake/Templates/Geant4Config.cmake.in (Version 11.3.0) and /cmake/Templates/Geant4Config.cmake.in (Version 11.0.p4)


  1 # - Geant4 CMake Configuration File for Extern      1 # - Geant4 CMake Configuration File for External Projects
  2 # This file is configured by Geant4 for use by      2 # This file is configured by Geant4 for use by an external project
  3 # This file is configured by Geant4's CMake sy      3 # This file is configured by Geant4's CMake system and SHOULD NOT BE EDITED
  4 #                                                   4 #
  5 # It defines the following variables                5 # It defines the following variables
  6 #  Geant4_INCLUDE_DIRS - include directories f      6 #  Geant4_INCLUDE_DIRS - include directories for Geant4
                                                   >>   7 #  Geant4_DEFINITIONS  - compile definitions needed to use Geant4
  7 #  Geant4_LIBRARIES    - libraries to link aga      8 #  Geant4_LIBRARIES    - libraries to link against
  8 #  Geant4_BUILD_TYPE   - Build type (e.g. "Rel      9 #  Geant4_BUILD_TYPE   - Build type (e.g. "Release") used to build this
  9 #                        install. Only set if      10 #                        install. Only set if Geant4 was installed using
 10 #                        a single mode tool (e     11 #                        a single mode tool (e.g. make, ninja).
 11 #  Geant4_CXX_FLAGS    - Recommended CXX flags     12 #  Geant4_CXX_FLAGS    - Recommended CXX flags for the compiler used to
 12 #                        build the Geant4 libr     13 #                        build the Geant4 libraries.
 13 #  Geant4_CXX_FLAGS_<CONFIG> - Recommended CXX     14 #  Geant4_CXX_FLAGS_<CONFIG> - Recommended CXX flags for build mode CONFIG.
 14 #  Geant4_USE_FILE     - path to a CMake modul     15 #  Geant4_USE_FILE     - path to a CMake module which may be included to
 15 #                        help setup CMake vari     16 #                        help setup CMake variables
 16 #  Geant4_CXXSTD       - C++ Standard used to      17 #  Geant4_CXXSTD       - C++ Standard used to compile Geant4, e.g. c++98
 17 #  Geant4_TLS_MODEL    - Thread Local Storage      18 #  Geant4_TLS_MODEL    - Thread Local Storage model used. Only set if
 18 #                        the build used an exp     19 #                        the build used an explicit model.
 19 #                                                  20 #
 20 # You may supply a version number through find     21 # You may supply a version number through find_package which will be checked
 21 # against the version of this build. Standard      22 # against the version of this build. Standard CMake logic is used so that
 22 # the EXACT flag may be passed, and otherwise      23 # the EXACT flag may be passed, and otherwise this build will report itself
 23 # as compatible with the requested version if:     24 # as compatible with the requested version if:
 24 #                                                  25 #
 25 #  VERSION_OF_THIS_BUILD >= VERSION_REQUESTED      26 #  VERSION_OF_THIS_BUILD >= VERSION_REQUESTED
 26 #                                                  27 #
 27 # By default only the core (or kernel) of Gean     28 # By default only the core (or kernel) of Geant4 is activated by this
 28 # module. You can specify additional component     29 # module. You can specify additional components of Geant4 through the
 29 # COMPONENTS argument to find_package. By defa     30 # COMPONENTS argument to find_package. By default, all core libraries of
 30 # Geant4 are appended to the Geant4_LIBRARIES      31 # Geant4 are appended to the Geant4_LIBRARIES variable. Specifying
 31 # additional components will enable a check on     32 # additional components will enable a check on the existence of these
 32 # components, with the following per component     33 # components, with the following per component variables being set:
 33 #                                                  34 #
 34 #  Geant4_${COMPONENT}_FOUND    TRUE is the Ge     35 #  Geant4_${COMPONENT}_FOUND    TRUE is the Geant4 library "component" was
 35 #                               found              36 #                               found
 36 #                                                  37 #
 37 #  Geant4_${COMPONENT}_LIBRARY  Contains the l     38 #  Geant4_${COMPONENT}_LIBRARY  Contains the library for the specified
 38 #                               "component" IF     39 #                               "component" IF the component is a library.
 39 #                                                  40 #
 40 # In Geant4, components can be optional subcom     41 # In Geant4, components can be optional subcomponents of an always
 41 # available library. In that case there will b     42 # available library. In that case there will be no
 42 # Geant4_{COMPONENT}_LIBRARY variable. These n     43 # Geant4_{COMPONENT}_LIBRARY variable. These non-library components are
 43 # generally activated by compile definitions t <<  44 # generally activated by compile definitions, and in these cases the
 44 # COMPILE_DEFINITIONS property.                <<  45 # appropriate definition will be added to the Geant4_DEFINITIONS component.
 45 #                                                  46 #
 46 # If you use the REQUIRED and/or COMPONENTS ar     47 # If you use the REQUIRED and/or COMPONENTS arguments of find_package to
 47 # specify components, then the module will iss     48 # specify components, then the module will issue a FATAL_ERROR if the
 48 # found Geant4 does not have the requested com     49 # found Geant4 does not have the requested component(s). Any components
 49 # specified through the OPTIONAL_COMPONENTS ar     50 # specified through the OPTIONAL_COMPONENTS argument will be enabled
 50 # only if the found Geant4 supports them, with     51 # only if the found Geant4 supports them, with no error being raised if
 51 # they are not supported.                          52 # they are not supported.
 52 #                                                  53 #
 53 # The components available generally correspon     54 # The components available generally correspond to configurations of
 54 # the Geant4 libraries or optional extras that     55 # the Geant4 libraries or optional extras that Geant4 can be built with.
 55 #                                                  56 #
 56 # Library Configuration                            57 # Library Configuration
 57 # ---------------------                            58 # ---------------------
 58 #  static            (Static libraries availab     59 #  static            (Static libraries available. Using this component
 59 #                     when static libraries ar     60 #                     when static libraries are available will result in
 60 #                     Geant4_LIBRARIES being p     61 #                     Geant4_LIBRARIES being populated with the static
 61 #                     versions of the Geant4 l     62 #                     versions of the Geant4 libraries. It does not, and cannot,
 62 #                     guarantee the use of sta     63 #                     guarantee the use of static third party libraries.)
 63 #  multithreaded     (Libraries are multithrea     64 #  multithreaded     (Libraries are multithread capable)
 64 #                                                  65 #
 65 #  usolids           (Geant4 solids are replac     66 #  usolids           (Geant4 solids are replaced with USolids equivalents)
 66 #                                                  67 #
 67 #  smartstack        (G4event library G4StackM     68 #  smartstack        (G4event library G4StackManager uses G4SmartTrackStack)
 68 #                                                  69 #
 69 #  php_as_hp         (G4processes library Part     70 #  php_as_hp         (G4processes library ParticleHP built as HP)
 70 #                                                  71 #
 71 # Optional Components                              72 # Optional Components
 72 # -------------------                              73 # -------------------
 73 #  gdml              (GDML support)                74 #  gdml              (GDML support)
 74 #  g3tog4            (Geant3 geometry call lis     75 #  g3tog4            (Geant3 geometry call list reader library)
 75 #  freetype          (G4analysis library has f     76 #  freetype          (G4analysis library has freetype support)
 76 #  hdf5              (G4analysis library has H     77 #  hdf5              (G4analysis library has HDF5 support)
 77 #                                                  78 #
 78 #  ui_tcsh           (TCsh Style Application C     79 #  ui_tcsh           (TCsh Style Application Command Line Interface)
 79 #  ui_win32          (WIN32 Style Application      80 #  ui_win32          (WIN32 Style Application Command Line Interface)
 80 #                                                  81 #
 81 #  motif             (Motif-X11/OpenGL Graphic     82 #  motif             (Motif-X11/OpenGL Graphical User Interface)
 82 #  qt                (Qt/OpenGL Graphical User <<  83 #  qt                (Qt5/OpenGL Graphical User Interface)
 83 #                                                  84 #
 84 #  vis_Vtk           (VTK Graphical User Inter << 
 85 #  vis_openinventor  (OpenInventor visualizati << 
 86 #  vis_opengl_x11    (OpenGL visualization wit     85 #  vis_opengl_x11    (OpenGL visualization with X11 interface)
 87 #  vis_opengl_win32  (OpenGL visualization wit     86 #  vis_opengl_win32  (OpenGL visualization with X11 interface)
 88 #  vis_raytracer_x11 (RayTracer visualization      87 #  vis_raytracer_x11 (RayTracer visualization with X11 interface)
                                                   >>  88 #  vis_openinventor  (OpenInventor visualization)
                                                   >>  89 #
                                                   >>  90 #  vis_toolssg_x11_gles     (ToolsSG visualization with X11 windowing and GLES rendering)
                                                   >>  91 #  vis_toolssg_xt_gles      (ToolsSG visualization with Xt windowing and GLES rendering)
                                                   >>  92 #  vis_toolssg_qt_gles      (ToolsSG visualization with Qt windowing and GLES rendering)
                                                   >>  93 #  vis_toolssg_windows_gles (ToolsSG visualization with Windows windowing and GLES rendering)
 89 #                                                  94 #
 90 # In addition, two 'shorthand' components are      95 # In addition, two 'shorthand' components are defined to help activate all
 91 # available User Interface and Visualization d     96 # available User Interface and Visualization drivers:
 92 #                                                  97 #
 93 #  ui_all            (All available UI drivers     98 #  ui_all            (All available UI drivers)
 94 #  vis_all           (All available Vis driver     99 #  vis_all           (All available Vis drivers)
 95 #                                                 100 #
 96 # These never result in a FATAL_ERROR, even if    101 # These never result in a FATAL_ERROR, even if the REQUIRED find_package
 97 # argument is set. This is because these optio    102 # argument is set. This is because these options do not depend on specific
 98 # components being available.                     103 # components being available.
 99 #                                                 104 #
100 # You can also query whether the Geant4 found     105 # You can also query whether the Geant4 found uses the builtin or system
101 # versions of CLHEP, ZLIB, or Expat after call    106 # versions of CLHEP, ZLIB, or Expat after calling find_package via the variables
102 #                                                 107 #
103 #  Geant4_builtin_clhep_FOUND   (TRUE if Geant    108 #  Geant4_builtin_clhep_FOUND   (TRUE if Geant4 built with internal CLHEP)
104 #  Geant4_system_clhep_FOUND    (TRUE if Geant    109 #  Geant4_system_clhep_FOUND    (TRUE if Geant4 built with external CLHEP)
105 #  Geant4_builtin_expat_FOUND   (TRUE if Geant    110 #  Geant4_builtin_expat_FOUND   (TRUE if Geant4 built with internal Expat)
106 #  Geant4_builtin_zlib_FOUND    (TRUE if Geant    111 #  Geant4_builtin_zlib_FOUND    (TRUE if Geant4 built with internal Zlib)
107 #                                                 112 #
108 # These are not used via components as they do    113 # These are not used via components as they do not, in general, affect
109 # the use of Geant4 in an application unless y    114 # the use of Geant4 in an application unless you yourself make direct
110 # calls to these APIs. As the builtin librarie    115 # calls to these APIs. As the builtin libraries only contain the code
111 # required directly by the Geant4 toolkit, you    116 # required directly by the Geant4 toolkit, you may wish to perform a
112 # configure time check in these cases that the    117 # configure time check in these cases that the builtin libraries contain
113 # the calls required. In both cases, the Geant    118 # the calls required. In both cases, the Geant4_INCLUDE_DIRS and
114 # Geant4_LIBRARIES variables will be populated    119 # Geant4_LIBRARIES variables will be populated to use the builtin or
115 # system APIs as required, and you should use     120 # system APIs as required, and you should use these to ensure you compile
116 # and link against the same API version.          121 # and link against the same API version.
117 #                                                 122 #
118 # Environment variables for, and directory pat    123 # Environment variables for, and directory paths to, physics datasets
119 # used by some Geant4 physics processes may be    124 # used by some Geant4 physics processes may be determined from the
120 # variables                                       125 # variables
121 #                                                 126 #
122 #  Geant4_DATASETS               (List of data    127 #  Geant4_DATASETS               (List of dataset names known to Geant4)
123 #  Geant4_DATASET_<NAME>_ENVVAR  (Name of envi    128 #  Geant4_DATASET_<NAME>_ENVVAR  (Name of environment variable used by
124 #                                 Geant4 to ob    129 #                                 Geant4 to obtain path to dataset
125 #                                 <NAME>)         130 #                                 <NAME>)
126 #  Geant4_DATASET_<NAME>_PATH    (Path to data    131 #  Geant4_DATASET_<NAME>_PATH    (Path to dataset <NAME>. NB this may
127 #                                 point to a n    132 #                                 point to a non-existent path if Geant4
128 #                                 was configur    133 #                                 was configured not to install data)
129 #                                                 134 #
130 #---------------------------------------------    135 #-----------------------------------------------------------------------
131 # Variables used by this module which can chan    136 # Variables used by this module which can change the default behaviour of
132 # this module. They need to be set prior to th    137 # this module. They need to be set prior to the call to find_package
133 #                                                 138 #
134 #  Geant4_CONFIG_DEBUG    If set, enable extra    139 #  Geant4_CONFIG_DEBUG    If set, enable extra messaging output which can
135 #                         be helpful in debugg    140 #                         be helpful in debugging and identifying problems
136 #                         with the configurati    141 #                         with the configuration.
137 #                                                 142 #
138 #---------------------------------------------    143 #-----------------------------------------------------------------------
139                                                   144 
140 #---------------------------------------------    145 #-----------------------------------------------------------------------
141 # DEBUG : print out the variables passed via f    146 # DEBUG : print out the variables passed via find_package arguments
142 #                                                 147 #
143 if(Geant4_CONFIG_DEBUG)                           148 if(Geant4_CONFIG_DEBUG)
144   message(STATUS "G4CFG_DEBUG : Geant4_VERSION    149   message(STATUS "G4CFG_DEBUG : Geant4_VERSION         = ${Geant4_VERSION}")
145   message(STATUS "G4CFG_DEBUG : Geant4_FIND_VE    150   message(STATUS "G4CFG_DEBUG : Geant4_FIND_VERSION    = ${Geant4_FIND_VERSION}")
146   message(STATUS "G4CFG_DEBUG : Geant4_FIND_RE    151   message(STATUS "G4CFG_DEBUG : Geant4_FIND_REQUIRED   = ${Geant4_FIND_REQUIRED}")
147   message(STATUS "G4CFG_DEBUG : Geant4_FIND_CO    152   message(STATUS "G4CFG_DEBUG : Geant4_FIND_COMPONENTS = ${Geant4_FIND_COMPONENTS}")
148                                                   153 
149   foreach(_cpt ${Geant4_FIND_COMPONENTS})         154   foreach(_cpt ${Geant4_FIND_COMPONENTS})
150     message(STATUS "G4CFG_DEBUG : Geant4_FIND_    155     message(STATUS "G4CFG_DEBUG : Geant4_FIND_REQUIRED_${_cpt} = ${Geant4_FIND_REQUIRED_${_cpt}}")
151   endforeach()                                    156   endforeach()
152                                                   157 
153   message(STATUS "G4CFG_DEBUG : Geant4_LIBDEPS    158   message(STATUS "G4CFG_DEBUG : Geant4_LIBDEPS_LOADED = ${Geant4_LIBDEPS_LOADED}")
154 endif()                                           159 endif()
155                                                   160 
156 #---------------------------------------------    161 #-----------------------------------------------------------------------
157 # Check that consumers use the minimum needed     162 # Check that consumers use the minimum needed CMake version
158 # Geant4 uses cxx_std_EP to define the standar    163 # Geant4 uses cxx_std_EP to define the standard it was built against
159 # 3.8 and above support EP=17. 3.12 and above     164 # 3.8 and above support EP=17. 3.12 and above add 20. 3.20 and above add 23.
160 # We continue to support the earlier version w    165 # We continue to support the earlier version whilst checking for consumers using 20
161 cmake_policy(VERSION 3.8...3.18)                  166 cmake_policy(VERSION 3.8...3.18)
162 if(CMAKE_VERSION VERSION_LESS 3.8)                167 if(CMAKE_VERSION VERSION_LESS 3.8)
163   message(FATAL_ERROR "Projects consuming Gean    168   message(FATAL_ERROR "Projects consuming Geant4Config require CMake 3.8 or newer")
164 endif()                                           169 endif()
165                                                   170 
166 if(("@CMAKE_CXX_STANDARD@" GREATER_EQUAL 23) A    171 if(("@CMAKE_CXX_STANDARD@" GREATER_EQUAL 23) AND (CMAKE_VERSION VERSION_LESS 3.20))
167   message(FATAL_ERROR "Projects consuming Gean    172   message(FATAL_ERROR "Projects consuming Geant4Config require CMake 3.20 or newer (for C++23 support)")
168 endif()                                           173 endif()
169                                                   174 
170 if(("@CMAKE_CXX_STANDARD@" GREATER_EQUAL 20) A    175 if(("@CMAKE_CXX_STANDARD@" GREATER_EQUAL 20) AND (CMAKE_VERSION VERSION_LESS 3.12))
171   message(FATAL_ERROR "Projects consuming Gean    176   message(FATAL_ERROR "Projects consuming Geant4Config require CMake 3.12 or newer (for C++20 support)")
172 endif()                                           177 endif()
173                                                   178 
174 # - Help find dependencies                        179 # - Help find dependencies
175 include(CMakeFindDependencyMacro)                 180 include(CMakeFindDependencyMacro)
176                                                   181 
177 #---------------------------------------------    182 #-----------------------------------------------------------------------
178 # Locate ourselves, since all other config fil    183 # Locate ourselves, since all other config files should have been
179 # installed alongside us...                       184 # installed alongside us...
180 #                                                 185 #
181 get_filename_component(_geant4_thisdir "${CMAK    186 get_filename_component(_geant4_thisdir "${CMAKE_CURRENT_LIST_FILE}" PATH)
182                                                   187 
183 #---------------------------------------------    188 #-----------------------------------------------------------------------
184 # Provide *recommended* compiler flags used by    189 # Provide *recommended* compiler flags used by this build of Geant4
185 # Don't mess with the actual CMAKE_CXX_FLAGS!!    190 # Don't mess with the actual CMAKE_CXX_FLAGS!!!
186 # It's up to the user what to do with these       191 # It's up to the user what to do with these
187 @GEANT4_COMPILER_FLAG_HINTS@                      192 @GEANT4_COMPILER_FLAG_HINTS@
188                                                   193 
189 # - Provide variable indicating C++ Standard w    194 # - Provide variable indicating C++ Standard we were compiled against
190 set(Geant4_CXX_STANDARD "@CMAKE_CXX_STANDARD@"    195 set(Geant4_CXX_STANDARD "@CMAKE_CXX_STANDARD@")
191                                                   196 
192 #---------------------------------------------    197 #-----------------------------------------------------------------------
                                                   >> 198 # Set the base compile definitions required to use Geant4 if the variable
                                                   >> 199 # does not exist (we do this to ensure multiple calls to find_package
                                                   >> 200 # don't overwrite previous invocations)
                                                   >> 201 # Components may append to this, but should prefer usage requirements
                                                   >> 202 # via INTERFACE_COMPILE_DEFINITIONS
                                                   >> 203 if(NOT Geant4_DEFINITIONS)
                                                   >> 204   set(Geant4_DEFINITIONS @GEANT4_CORE_DEFINITIONS@)
                                                   >> 205 endif()
                                                   >> 206 
                                                   >> 207 #-----------------------------------------------------------------------
193 # Configure the path to the Geant4 headers, us    208 # Configure the path to the Geant4 headers, using a relative path if
194 # possible. This is only known at CMake time,     209 # possible. This is only known at CMake time, so we expand a CMake
195 # supplied variable.                              210 # supplied variable.
196 #                                                 211 #
197 @GEANT4_INCLUDE_DIR_SETUP@                        212 @GEANT4_INCLUDE_DIR_SETUP@
198 set(Geant4_INCLUDE_DIRS "${Geant4_INCLUDE_DIR}    213 set(Geant4_INCLUDE_DIRS "${Geant4_INCLUDE_DIR}")
199                                                   214 
200 # Push our own module path onto the CMake one     215 # Push our own module path onto the CMake one to help refind dependencies
201 # - Popped at end of this module                  216 # - Popped at end of this module
202 list(INSERT CMAKE_MODULE_PATH 0 "${CMAKE_CURRE    217 list(INSERT CMAKE_MODULE_PATH 0 "${CMAKE_CURRENT_LIST_DIR}/Modules")
203                                                   218 
204 #---------------------------------------------    219 #-----------------------------------------------------------------------
205 # Data Resources                                  220 # Data Resources
206 # NB: Because data paths can be "forward decla    221 # NB: Because data paths can be "forward declared" these offer no
207 # guarantee of data existence. They only provi    222 # guarantee of data existence. They only provide a hint.
208 #                                                 223 #
209 set(Geant4_DATASET_DESCRIPTIONS "@GEANT4_DATAS    224 set(Geant4_DATASET_DESCRIPTIONS "@GEANT4_DATASET_DESCRIPTIONS@")
210                                                   225 
211 foreach(_g4dataset_tuple ${Geant4_DATASET_DESC    226 foreach(_g4dataset_tuple ${Geant4_DATASET_DESCRIPTIONS})
212   # Format is NAME|ENVVAR|PATH                    227   # Format is NAME|ENVVAR|PATH
213   string(REPLACE "|" ";" _g4dataset_tuple "${_    228   string(REPLACE "|" ";" _g4dataset_tuple "${_g4dataset_tuple}")
214   list(GET _g4dataset_tuple 0 _g4dataset_name)    229   list(GET _g4dataset_tuple 0 _g4dataset_name)
215   list(APPEND Geant4_DATASETS ${_g4dataset_nam    230   list(APPEND Geant4_DATASETS ${_g4dataset_name})
216   list(GET _g4dataset_tuple 1 Geant4_DATASET_$    231   list(GET _g4dataset_tuple 1 Geant4_DATASET_${_g4dataset_name}_ENVVAR)
217   list(GET _g4dataset_tuple 2 Geant4_DATASET_$    232   list(GET _g4dataset_tuple 2 Geant4_DATASET_${_g4dataset_name}_PATH)
218 endforeach()                                      233 endforeach()
219 unset(Geant4_DATASET_DESCRIPTIONS)                234 unset(Geant4_DATASET_DESCRIPTIONS)
220                                                   235 
221 #---------------------------------------------    236 #-----------------------------------------------------------------------
222 # Optional Build Components                    << 237 # Setup components.
223 #--------------------------------------------- << 
224 # - General Multithreading                     << 
225 set(Geant4_multithreaded_FOUND @GEANT4_BUILD_M << 
226 if(Geant4_multithreaded_FOUND)                 << 
227   # - Define variable to indicate TLS model us << 
228   set(Geant4_TLS_MODEL "@GEANT4_BUILD_TLS_MODE << 
229   if(Geant4_TLS_MODEL STREQUAL "auto")         << 
230     unset(Geant4_TLS_MODEL)                    << 
231   endif()                                      << 
232 endif()                                        << 
233                                                << 
234 # - Smart track stack                          << 
235 set(Geant4_smartstack_FOUND @GEANT4_USE_SMARTS << 
236                                                << 
237 # - ParticleHP as HP                           << 
238 set(Geant4_php_as_hp_FOUND @GEANT4_BUILD_PHP_A << 
239                                                << 
240 # - G3toG4                                     << 
241 set(Geant4_g3tog4_FOUND @GEANT4_USE_G3TOG4@)   << 
242 if(Geant4_g3tog4_FOUND)                        << 
243   if(Geant4_FIND_REQUIRED_g3tog4)              << 
244     set(_geant4_use_g3tog4_library ON)         << 
245   endif()                                      << 
246 endif()                                        << 
247                                                << 
248 #--------------------------------------------- << 
249 # Optional Components that may depend on exter << 
250 #---------------------------------------------    238 #-----------------------------------------------------------------------
                                                   >> 239 # Many components are simply present as parts of libraries or always built
                                                   >> 240 # but require additional compile definitions.
                                                   >> 241 #
251 # Optionally import build-time package setting    242 # Optionally import build-time package settings to provide hard values
252 # for find_package to work with                   243 # for find_package to work with
253 include("${CMAKE_CURRENT_LIST_DIR}/Geant4Packa    244 include("${CMAKE_CURRENT_LIST_DIR}/Geant4PackageCache.cmake" OPTIONAL)
254                                                   245 
255 # - CLHEP                                      << 246 # Builtin/External packages
256 set(Geant4_system_clhep_FOUND @GEANT4_USE_SYST    247 set(Geant4_system_clhep_FOUND @GEANT4_USE_SYSTEM_CLHEP@)
                                                   >> 248 
257 if(Geant4_system_clhep_FOUND)                     249 if(Geant4_system_clhep_FOUND)
258   set(Geant4_builtin_clhep_FOUND FALSE)           250   set(Geant4_builtin_clhep_FOUND FALSE)
259   find_dependency(CLHEP @CLHEP_VERSION@ EXACT     251   find_dependency(CLHEP @CLHEP_VERSION@ EXACT CONFIG)
260 else()                                            252 else()
261   set(Geant4_builtin_clhep_FOUND TRUE)            253   set(Geant4_builtin_clhep_FOUND TRUE)
262 endif()                                           254 endif()
263                                                   255 
264 # - EXPAT                                      << 
265 set(Geant4_builtin_expat_FOUND @GEANT4_USE_BUI    256 set(Geant4_builtin_expat_FOUND @GEANT4_USE_BUILTIN_EXPAT@)
266 if(NOT Geant4_builtin_expat_FOUND)                257 if(NOT Geant4_builtin_expat_FOUND)
267   find_dependency(EXPAT @EXPAT_VERSION_STRING@    258   find_dependency(EXPAT @EXPAT_VERSION_STRING@)
268   include("${CMAKE_CURRENT_LIST_DIR}/G4EXPATSh    259   include("${CMAKE_CURRENT_LIST_DIR}/G4EXPATShim.cmake")
269 endif()                                           260 endif()
270                                                   261 
271 # - ZLIB                                       << 
272 set(Geant4_builtin_zlib_FOUND @GEANT4_USE_BUIL    262 set(Geant4_builtin_zlib_FOUND @GEANT4_USE_BUILTIN_ZLIB@)
273 if(NOT Geant4_builtin_zlib_FOUND)                 263 if(NOT Geant4_builtin_zlib_FOUND)
274   find_dependency(ZLIB @ZLIB_VERSION_STRING@)     264   find_dependency(ZLIB @ZLIB_VERSION_STRING@)
275 endif()                                           265 endif()
276                                                   266 
277 # - PTL/TBB                                    << 
278 set(Geant4_system_ptl_FOUND @GEANT4_USE_SYSTEM    267 set(Geant4_system_ptl_FOUND @GEANT4_USE_SYSTEM_PTL@)
279 set(Geant4_TBB_FOUND @GEANT4_USE_TBB@)         << 
280 if(Geant4_system_ptl_FOUND)                       268 if(Geant4_system_ptl_FOUND)
281   set(Geant4_builtin_ptl_FOUND FALSE)             269   set(Geant4_builtin_ptl_FOUND FALSE)
282   if(Geant4_TBB_FOUND)                         << 270   find_dependency(PTL @PTL_VERSION_STRING@)
283     find_dependency(PTL @PTL_VERSION@ COMPONEN << 
284   else()                                       << 
285     find_dependency(PTL @PTL_VERSION@)         << 
286   endif()                                      << 
287 else()                                            271 else()
288   # We know exactly where PTL is                  272   # We know exactly where PTL is
289   set(Geant4_builtin_ptl_FOUND TRUE)              273   set(Geant4_builtin_ptl_FOUND TRUE)
290   if(CMAKE_VERSION VERSION_GREATER 3.8.9999)      274   if(CMAKE_VERSION VERSION_GREATER 3.8.9999)
291     find_dependency(PTL NO_DEFAULT_PATH PATHS  << 275     find_dependency(PTL @PTL_VERSION_STRING@ NO_DEFAULT_PATH PATHS "@PACKAGE_PTL_PREFIX@")
292   else()                                          276   else()
293     find_package(PTL REQUIRED NO_DEFAULT_PATH  << 277     find_package(PTL @PTL_VERSION_STRING@ REQUIRED NO_DEFAULT_PATH PATHS "@PACKAGE_PTL_PREFIX@")
                                                   >> 278   endif()
                                                   >> 279 endif()
                                                   >> 280 
                                                   >> 281 # - Multithreading
                                                   >> 282 set(Geant4_multithreaded_FOUND @GEANT4_BUILD_MULTITHREADED@)
                                                   >> 283 if(Geant4_multithreaded_FOUND)
                                                   >> 284   # - Define variable to indicate TLS model used
                                                   >> 285   set(Geant4_TLS_MODEL "@GEANT4_BUILD_TLS_MODEL@")
                                                   >> 286   if(Geant4_TLS_MODEL STREQUAL "auto")
                                                   >> 287     unset(Geant4_TLS_MODEL)
294   endif()                                         288   endif()
295 endif()                                           289 endif()
296                                                   290 
297 # - GDML                                          291 # - GDML
298 set(Geant4_gdml_FOUND @GEANT4_USE_GDML@)          292 set(Geant4_gdml_FOUND @GEANT4_USE_GDML@)
299 if(Geant4_gdml_FOUND)                             293 if(Geant4_gdml_FOUND)
300   find_dependency(XercesC @XercesC_VERSION@)      294   find_dependency(XercesC @XercesC_VERSION@)
301 endif()                                           295 endif()
302                                                   296 
                                                   >> 297 # - Smart track stack
                                                   >> 298 set(Geant4_smartstack_FOUND @GEANT4_USE_SMARTSTACK@)
                                                   >> 299 
                                                   >> 300 # - ParticleHP as HP
                                                   >> 301 set(Geant4_php_as_hp_FOUND @GEANT4_BUILD_PHP_AS_HP@)
                                                   >> 302 
                                                   >> 303 # - TBB
                                                   >> 304 set(Geant4_TBB_FOUND @GEANT4_USE_TBB@)
                                                   >> 305 if(Geant4_TBB_FOUND)
                                                   >> 306   find_dependency(TBB @TBB_VERSION@)
                                                   >> 307 endif()
                                                   >> 308 
                                                   >> 309 # - TiMemory
                                                   >> 310 set(Geant4_timemory_FOUND @GEANT4_USE_TIMEMORY@)
                                                   >> 311 if(Geant4_timemory_FOUND)
                                                   >> 312   set(_geant4_use_timemory_library ON)
                                                   >> 313   set(timemory_DIR "@timemory_DIR@" CACHE PATH "timemory installation for Geant4")
                                                   >> 314   if(NOT TARGET @timemory_FIND_COMPONENTS_INTERFACE@)
                                                   >> 315     add_library(@timemory_FIND_COMPONENTS_INTERFACE@ INTERFACE IMPORTED)
                                                   >> 316     set(timemory_FIND_COMPONENTS_INTERFACE @timemory_FIND_COMPONENTS_INTERFACE@)
                                                   >> 317     find_package(timemory @G4timemory_VERSION@ REQUIRED QUIET
                                                   >> 318         COMPONENTS @G4timemory_COMPONENTS@)
                                                   >> 319   endif()
                                                   >> 320   set(timemory_LIBRARIES @timemory_FIND_COMPONENTS_INTERFACE@)
                                                   >> 321 endif()
                                                   >> 322 
                                                   >> 323 # - G3toG4
                                                   >> 324 set(Geant4_g3tog4_FOUND @GEANT4_USE_G3TOG4@)
                                                   >> 325 if(Geant4_g3tog4_FOUND)
                                                   >> 326   if(Geant4_FIND_REQUIRED_g3tog4)
                                                   >> 327     set(_geant4_use_g3tog4_library ON)
                                                   >> 328   endif()
                                                   >> 329 endif()
                                                   >> 330 
303 # - VecGeom                                       331 # - VecGeom
304 set(Geant4_usolids_FOUND @GEANT4_USE_USOLIDS_E    332 set(Geant4_usolids_FOUND @GEANT4_USE_USOLIDS_EITHER@)
305 if(Geant4_usolids_FOUND)                          333 if(Geant4_usolids_FOUND)
306   find_dependency(VecGeom @VecGeom_VERSION@)      334   find_dependency(VecGeom @VecGeom_VERSION@)
307 endif()                                           335 endif()
308                                                   336 
309 # - Freetype                                      337 # - Freetype
310 set(Geant4_freetype_FOUND @GEANT4_USE_FREETYPE    338 set(Geant4_freetype_FOUND @GEANT4_USE_FREETYPE@)
311 if(Geant4_freetype_FOUND)                         339 if(Geant4_freetype_FOUND)
312   find_dependency(Freetype @FREETYPE_VERSION_S    340   find_dependency(Freetype @FREETYPE_VERSION_STRING@)
313   include("${CMAKE_CURRENT_LIST_DIR}/G4Freetyp    341   include("${CMAKE_CURRENT_LIST_DIR}/G4FreetypeShim.cmake")
314 endif()                                           342 endif()
315                                                   343 
316 # - HDF5                                          344 # - HDF5
317 set(Geant4_hdf5_FOUND @GEANT4_USE_HDF5@)          345 set(Geant4_hdf5_FOUND @GEANT4_USE_HDF5@)
318 if(Geant4_hdf5_FOUND)                             346 if(Geant4_hdf5_FOUND)
319   find_dependency(HDF5)                        << 347   find_dependency(HDF5 @HDF5_VERSION@)
320   include("${CMAKE_CURRENT_LIST_DIR}/G4HDF5Shi    348   include("${CMAKE_CURRENT_LIST_DIR}/G4HDF5Shim.cmake")
321 endif()                                           349 endif()
322                                                   350 
323 #---------------------------------------------    351 #-----------------------------------------------------------------------
324 # UI/VIS                                          352 # UI/VIS
325 #                                                 353 #
326 # Prefer Legacy GL when using CMake >= 3.10       354 # Prefer Legacy GL when using CMake >= 3.10
327 set(OpenGL_GL_PREFERENCE_SAVE "${OpenGL_GL_PRE    355 set(OpenGL_GL_PREFERENCE_SAVE "${OpenGL_GL_PREFERENCE}")
328 set(OpenGL_GL_PREFERENCE "LEGACY")                356 set(OpenGL_GL_PREFERENCE "LEGACY")
329                                                   357 
330 # - Helper variables for ui/vis_all components    358 # - Helper variables for ui/vis_all components
331 if("ui_all" IN_LIST Geant4_FIND_COMPONENTS)       359 if("ui_all" IN_LIST Geant4_FIND_COMPONENTS)
332   set(Geant4_ui_all_FOUND TRUE)                   360   set(Geant4_ui_all_FOUND TRUE)
333 endif()                                           361 endif()
334                                                   362 
335 if("vis_all" IN_LIST Geant4_FIND_COMPONENTS)      363 if("vis_all" IN_LIST Geant4_FIND_COMPONENTS)
336   set(Geant4_vis_all_FOUND TRUE)                  364   set(Geant4_vis_all_FOUND TRUE)
337 endif()                                           365 endif()
338                                                   366 
339 # - UI : TCSH                                     367 # - UI : TCSH
340 set(Geant4_ui_tcsh_FOUND @UNIX@)                  368 set(Geant4_ui_tcsh_FOUND @UNIX@)
                                                   >> 369 if(Geant4_ui_tcsh_FOUND)
                                                   >> 370   if(("ui_tcsh" IN_LIST Geant4_FIND_COMPONENTS) OR Geant4_ui_all_FOUND)
                                                   >> 371     list(APPEND Geant4_DEFINITIONS -DG4UI_USE_TCSH)
                                                   >> 372   endif()
                                                   >> 373 endif()
341                                                   374 
342 # - UI : win32                                    375 # - UI : win32
343 set(Geant4_ui_win32_FOUND @WIN32@)                376 set(Geant4_ui_win32_FOUND @WIN32@)
                                                   >> 377 if(Geant4_ui_win32_FOUND)
                                                   >> 378   if(("ui_win32" IN_LIST Geant4_FIND_COMPONENTS) OR Geant4_ui_all_FOUND)
                                                   >> 379     list(APPEND Geant4_DEFINITIONS -DG4UI_USE_WIN32)
                                                   >> 380   endif()
                                                   >> 381 endif()
344                                                   382 
345 #---------------------------------------------    383 #-----------------------------------------------------------------------
346 # Components which requires slightly more comp    384 # Components which requires slightly more complex setup
347 #                                                 385 #
348 # - Visualization : RayTracerX                    386 # - Visualization : RayTracerX
349 set(Geant4_vis_raytracer_x11_FOUND @GEANT4_USE    387 set(Geant4_vis_raytracer_x11_FOUND @GEANT4_USE_RAYTRACER_X11@)
350 if(Geant4_vis_raytracer_x11_FOUND)                388 if(Geant4_vis_raytracer_x11_FOUND)
351   find_dependency(X11)                            389   find_dependency(X11)
352   include("${CMAKE_CURRENT_LIST_DIR}/G4X11Shim    390   include("${CMAKE_CURRENT_LIST_DIR}/G4X11Shim.cmake")
                                                   >> 391 
                                                   >> 392   if(("vis_raytracer_x11" IN_LIST Geant4_FIND_COMPONENTS) OR Geant4_vis_all_FOUND)
                                                   >> 393     list(APPEND Geant4_DEFINITIONS -DG4VIS_USE_RAYTRACERX)
                                                   >> 394   endif()
353 endif()                                           395 endif()
354                                                   396 
355 # - Qt (UI and Vis!)                              397 # - Qt (UI and Vis!)
356 set(Geant4_qt_FOUND @GEANT4_USE_QT@)              398 set(Geant4_qt_FOUND @GEANT4_USE_QT@)
357 set(Geant4_qt3d_FOUND @GEANT4_USE_QT3D@)          399 set(Geant4_qt3d_FOUND @GEANT4_USE_QT3D@)
358 if(Geant4_qt_FOUND)                               400 if(Geant4_qt_FOUND)
359   # Must always refind Qt to recreate imported << 401   # Must always refind Qt5 to recreate imported targets. Because these
360   # are in the public interface, always need l    402   # are in the public interface, always need linking.
361   find_dependency(Qt@QT_VERSION_MAJOR@Core REQ << 403   find_dependency(Qt5Core REQUIRED)
362   find_dependency(Qt@QT_VERSION_MAJOR@Gui REQU << 404   find_dependency(Qt5Gui REQUIRED)
363   find_dependency(Qt@QT_VERSION_MAJOR@Widgets  << 405   find_dependency(Qt5Widgets REQUIRED)
364   find_dependency(Qt@QT_VERSION_MAJOR@OpenGL R << 406   find_dependency(Qt5OpenGL REQUIRED)
365   if(@QT_VERSION_MAJOR@ GREATER 5)             << 407   find_dependency(Qt5PrintSupport REQUIRED)
366     find_dependency(Qt@QT_VERSION_MAJOR@OpenGL << 
367   endif()                                      << 
368                                                   408 
369   if(Geant4_qt3d_FOUND)                           409   if(Geant4_qt3d_FOUND)
370     find_dependency(Qt@QT_VERSION_MAJOR@3DCore << 410     find_dependency(Qt53DCore @QT3D_MINIMUM_VERSION@ REQUIRED)
371     find_dependency(Qt@QT_VERSION_MAJOR@3DExtr << 411     find_dependency(Qt53DExtras @QT3D_MINIMUM_VERSION@ REQUIRED)
372     find_dependency(Qt@QT_VERSION_MAJOR@3DRend << 412     find_dependency(Qt53DRender @QT3D_MINIMUM_VERSION@ REQUIRED)
373   endif()                                         413   endif()
374                                                   414 
375   # Also require OpenGL                           415   # Also require OpenGL
376   find_dependency(OpenGL)                         416   find_dependency(OpenGL)
377                                                   417 
378   # Qt must be activated both directly and for    418   # Qt must be activated both directly and for OpenInventor
379   if(("qt" IN_LIST Geant4_FIND_COMPONENTS)        419   if(("qt" IN_LIST Geant4_FIND_COMPONENTS)
380      OR ("vis_openinventor" IN_LIST Geant4_FIN    420      OR ("vis_openinventor" IN_LIST Geant4_FIND_COMPONENTS)
                                                   >> 421      OR ("vis_toolssg_qt_gles" IN_LIST Geant4_FIND_COMPONENTS)
381      OR Geant4_ui_all_FOUND OR Geant4_vis_all_    422      OR Geant4_ui_all_FOUND OR Geant4_vis_all_FOUND)
                                                   >> 423     list(APPEND Geant4_DEFINITIONS -DG4UI_USE_QT -DG4VIS_USE_OPENGLQT)
382     set(_geant4_use_opengl_library ON)            424     set(_geant4_use_opengl_library ON)
383     # Qt3D is always on if available              425     # Qt3D is always on if available
384     set(_geant4_use_qt3D_library ${Geant4_qt3d    426     set(_geant4_use_qt3D_library ${Geant4_qt3d_FOUND})
385   endif()                                         427   endif()
386 endif()                                           428 endif()
387                                                   429 
388 # - Motif (UI and Vis!)                           430 # - Motif (UI and Vis!)
389 set(Geant4_motif_FOUND @GEANT4_USE_XM@)           431 set(Geant4_motif_FOUND @GEANT4_USE_XM@)
390 if(Geant4_motif_FOUND)                            432 if(Geant4_motif_FOUND)
391   find_dependency(X11)                            433   find_dependency(X11)
392   include("${CMAKE_CURRENT_LIST_DIR}/G4X11Shim    434   include("${CMAKE_CURRENT_LIST_DIR}/G4X11Shim.cmake")
393   find_dependency(Motif)                          435   find_dependency(Motif)
394   include("${CMAKE_CURRENT_LIST_DIR}/G4MotifSh    436   include("${CMAKE_CURRENT_LIST_DIR}/G4MotifShim.cmake")
395   if(APPLE)                                       437   if(APPLE)
396     find_dependency(XQuartzGL)                    438     find_dependency(XQuartzGL)
397   else()                                          439   else()
398     find_dependency(OpenGL)                       440     find_dependency(OpenGL)
399   endif()                                         441   endif()
400                                                   442 
401   # Motif can be activated both directly and f    443   # Motif can be activated both directly and for OpenInventor
402   if(("motif" IN_LIST Geant4_FIND_COMPONENTS)     444   if(("motif" IN_LIST Geant4_FIND_COMPONENTS)
403      OR ("vis_openinventor" IN_LIST Geant4_FIN    445      OR ("vis_openinventor" IN_LIST Geant4_FIND_COMPONENTS)
                                                   >> 446      OR ("vis_toolssg_xt_gles" IN_LIST Geant4_FIND_COMPONENTS)
404      OR Geant4_ui_all_FOUND OR Geant4_vis_all_    447      OR Geant4_ui_all_FOUND OR Geant4_vis_all_FOUND)
                                                   >> 448     list(APPEND Geant4_DEFINITIONS -DG4UI_USE_XM -DG4VIS_USE_OPENGLXM)
405     set(_geant4_use_opengl_library ON)            449     set(_geant4_use_opengl_library ON)
406   endif()                                         450   endif()
407 endif()                                           451 endif()
408                                                   452 
409 # - OpenGL X11                                    453 # - OpenGL X11
410 set(Geant4_vis_opengl_x11_FOUND @GEANT4_USE_OP    454 set(Geant4_vis_opengl_x11_FOUND @GEANT4_USE_OPENGL_X11@)
411 if(Geant4_vis_opengl_x11_FOUND)                   455 if(Geant4_vis_opengl_x11_FOUND)
412   find_dependency(X11)                            456   find_dependency(X11)
413   include("${CMAKE_CURRENT_LIST_DIR}/G4X11Shim    457   include("${CMAKE_CURRENT_LIST_DIR}/G4X11Shim.cmake")
414   if(APPLE)                                       458   if(APPLE)
415     find_dependency(XQuartzGL)                    459     find_dependency(XQuartzGL)
416   else()                                          460   else()
417     find_dependency(OpenGL)                       461     find_dependency(OpenGL)
418   endif()                                         462   endif()
419                                                   463 
420   if(("vis_opengl_x11" IN_LIST Geant4_FIND_COM    464   if(("vis_opengl_x11" IN_LIST Geant4_FIND_COMPONENTS) OR Geant4_vis_all_FOUND)
                                                   >> 465     list(APPEND Geant4_DEFINITIONS -DG4VIS_USE_OPENGLX)
421     set(_geant4_use_opengl_library ON)            466     set(_geant4_use_opengl_library ON)
422   endif()                                         467   endif()
423 endif()                                           468 endif()
424                                                   469 
425 # - OpenGL Win32                                  470 # - OpenGL Win32
426 set(Geant4_vis_opengl_win32_FOUND @GEANT4_USE_    471 set(Geant4_vis_opengl_win32_FOUND @GEANT4_USE_OPENGL_WIN32@)
427 if(Geant4_vis_opengl_win32_FOUND)                 472 if(Geant4_vis_opengl_win32_FOUND)
428   find_dependency(OpenGL)                         473   find_dependency(OpenGL)
429   if(("vis_opengl_win32" IN_LIST Geant4_FIND_C    474   if(("vis_opengl_win32" IN_LIST Geant4_FIND_COMPONENTS) OR Geant4_vis_all_FOUND)
                                                   >> 475     list(APPEND Geant4_DEFINITIONS -DG4VIS_USE_OPENGLWIN32)
430     set(_geant4_use_opengl_library ON)            476     set(_geant4_use_opengl_library ON)
431   endif()                                         477   endif()
432 endif()                                           478 endif()
433                                                   479 
434 # - OpenInventor                                  480 # - OpenInventor
435 set(Geant4_vis_openinventor_FOUND @GEANT4_USE_    481 set(Geant4_vis_openinventor_FOUND @GEANT4_USE_INVENTOR@)
436 set(Geant4_vis_openinventor_qt_FOUND @GEANT4_U    482 set(Geant4_vis_openinventor_qt_FOUND @GEANT4_USE_INVENTOR_QT@)
437 if(Geant4_vis_openinventor_FOUND)                 483 if(Geant4_vis_openinventor_FOUND)
438   find_dependency(Coin)                           484   find_dependency(Coin)
439                                                   485 
440   if(Geant4_vis_openinventor_qt_FOUND)            486   if(Geant4_vis_openinventor_qt_FOUND)
441     # Qt dependency handled by Geant4_vis_qt_F    487     # Qt dependency handled by Geant4_vis_qt_FOUND earlier,
442     # always ON if Inventor_QT is                 488     # always ON if Inventor_QT is
443     find_dependency(SoQt)                         489     find_dependency(SoQt)
444   else()                                          490   else()
445     if(WIN32)                                     491     if(WIN32)
446       find_dependency(SoWin)                      492       find_dependency(SoWin)
447     else()                                        493     else()
448       # Motif/X11/GL dependency handled by Gea    494       # Motif/X11/GL dependency handled by Geant4_motif_FOUND earlier,
449       # always ON if Inventor/Xt is.              495       # always ON if Inventor/Xt is.
450       find_dependency(SoXt)                       496       find_dependency(SoXt)
451     endif()                                       497     endif()
452   endif()                                         498   endif()
453                                                   499 
454   if(("vis_openinventor" IN_LIST Geant4_FIND_C    500   if(("vis_openinventor" IN_LIST Geant4_FIND_COMPONENTS) OR Geant4_vis_all_FOUND)
                                                   >> 501     if(Geant4_vis_openinventor_qt_FOUND)
                                                   >> 502       list(APPEND Geant4_DEFINITIONS -DG4VIS_USE_OI -DG4VIS_USE_OIQT)
                                                   >> 503     else()
                                                   >> 504       if(WIN32)
                                                   >> 505         list(APPEND Geant4_DEFINITIONS -DG4VIS_USE_OI -DG4VIS_USE_OIWIN32)
                                                   >> 506       else()
                                                   >> 507         list(APPEND Geant4_DEFINITIONS -DG4VIS_USE_OI -DG4VIS_USE_OIX)
                                                   >> 508       endif()
                                                   >> 509     endif()
                                                   >> 510 
455     set(_geant4_use_inventor_library ON)          511     set(_geant4_use_inventor_library ON)
456   endif()                                         512   endif()
457 endif()                                           513 endif()
458                                                   514 
                                                   >> 515 # - ToolsSG X11/GLES
                                                   >> 516 set(Geant4_vis_toolssg_x11_gles_FOUND @GEANT4_USE_TOOLSSG_X11_GLES@)
                                                   >> 517 if(Geant4_vis_toolssg_x11_gles_FOUND)
                                                   >> 518   find_dependency(X11)
                                                   >> 519   include("${CMAKE_CURRENT_LIST_DIR}/G4X11Shim.cmake")
                                                   >> 520   if(APPLE)
                                                   >> 521     find_dependency(XQuartzGL)
                                                   >> 522   else()
                                                   >> 523     find_dependency(OpenGL)
                                                   >> 524   endif()
                                                   >> 525 
                                                   >> 526   if(("vis_toolssg_x11_gles" IN_LIST Geant4_FIND_COMPONENTS) OR Geant4_vis_all_FOUND)
                                                   >> 527     list(APPEND Geant4_DEFINITIONS -DG4VIS_USE_TOOLSSG_X11_GLES)
                                                   >> 528     set(_geant4_use_toolssg_library ON)
                                                   >> 529   endif()
                                                   >> 530 endif()
                                                   >> 531 
                                                   >> 532 # - ToolsSG Windows/GLES
                                                   >> 533 set(Geant4_vis_toolssg_windows_gles_FOUND @GEANT4_USE_TOOLSSG_WINDOWS_GLES@)
                                                   >> 534 if(Geant4_vis_toolssg_windows_gles_FOUND)
                                                   >> 535   find_dependency(OpenGL)
                                                   >> 536   if(("vis_toolssg_windows_gles" IN_LIST Geant4_FIND_COMPONENTS) OR Geant4_vis_all_FOUND)
                                                   >> 537     list(APPEND Geant4_DEFINITIONS -DG4VIS_USE_TOOLSSG_WINDOWS_GLES)
                                                   >> 538     set(_geant4_use_toolssg_library ON)
                                                   >> 539   endif()
                                                   >> 540 endif()
                                                   >> 541 
                                                   >> 542 # - ToolsSG Xt/GLES
                                                   >> 543 set(Geant4_vis_toolssg_xt_gles_FOUND @GEANT4_USE_TOOLSSG_XT_GLES@)
                                                   >> 544 if(Geant4_vis_toolssg_xt_gles_FOUND)
                                                   >> 545   find_dependency(X11)
                                                   >> 546   include("${CMAKE_CURRENT_LIST_DIR}/G4X11Shim.cmake")
                                                   >> 547   if(APPLE)
                                                   >> 548     find_dependency(XQuartzGL)
                                                   >> 549   else()
                                                   >> 550     find_dependency(OpenGL)
                                                   >> 551   endif()
                                                   >> 552 
                                                   >> 553   if(("vis_toolssg_xt_gles" IN_LIST Geant4_FIND_COMPONENTS) OR Geant4_vis_all_FOUND)
                                                   >> 554     list(APPEND Geant4_DEFINITIONS -DG4VIS_USE_TOOLSSG_XT_GLES)
                                                   >> 555     set(_geant4_use_toolssg_library ON)
                                                   >> 556   endif()
                                                   >> 557 endif()
                                                   >> 558 
                                                   >> 559 # - ToolsSG Qt/GLES
                                                   >> 560 set(Geant4_vis_toolssg_qt_gles_FOUND @GEANT4_USE_TOOLSSG_QT_GLES@)
                                                   >> 561 if(Geant4_vis_toolssg_qt_gles_FOUND)
                                                   >> 562   find_dependency(OpenGL)
                                                   >> 563   if(("vis_toolssg_qt_gles" IN_LIST Geant4_FIND_COMPONENTS) OR Geant4_vis_all_FOUND)
                                                   >> 564     list(APPEND Geant4_DEFINITIONS -DG4VIS_USE_TOOLSSG_QT_GLES)
                                                   >> 565     set(_geant4_use_toolssg_library ON)
                                                   >> 566   endif()
                                                   >> 567 endif()
                                                   >> 568 
459 # Reset any OpenGL Preference                     569 # Reset any OpenGL Preference
460 set(OpenGL_GL_PREFERENCE "${OpenGL_GL_PREFEREN    570 set(OpenGL_GL_PREFERENCE "${OpenGL_GL_PREFERENCE_SAVE}")
461                                                   571 
462 set(Geant4_vis_Vtk_FOUND @GEANT4_USE_VTK@)        572 set(Geant4_vis_Vtk_FOUND @GEANT4_USE_VTK@)
463 if(Geant4_vis_Vtk_FOUND)                          573 if(Geant4_vis_Vtk_FOUND)
464   find_dependency(VTK 9 REQUIRED COMPONENTS    << 574   find_dependency(VTK)
465     CommonColor                                << 575   list(APPEND Geant4_DEFINITIONS -DG4VIS_USE_VTK)
466     InteractionStyle                           << 
467     IOExport                                   << 
468     GUISupportQt                               << 
469     RenderingVolumeOpenGL2                     << 
470   )                                            << 
471   set(_geant4_use_vtk_library ON)                 576   set(_geant4_use_vtk_library ON)
                                                   >> 577 
                                                   >> 578   if(Geant4_qt_FOUND)
                                                   >> 579     list(APPEND Geant4_DEFINITIONS -DG4VIS_USE_VTK_QT)
                                                   >> 580   endif()
472 endif()                                           581 endif()
473                                                   582 
474 #---------------------------------------------    583 #-----------------------------------------------------------------------
475 # Include the files listing all the imported t    584 # Include the files listing all the imported targets and configuring
476 # Intel/MSVC Compile Features                     585 # Intel/MSVC Compile Features
477 # (Not needed if used in the same Geant4 proje    586 # (Not needed if used in the same Geant4 project, or if we have run before)
478 # This is always installed in the same locatio    587 # This is always installed in the same location as us...
479 #                                                 588 #
480 if(NOT CMAKE_PROJECT_NAME STREQUAL Geant4)        589 if(NOT CMAKE_PROJECT_NAME STREQUAL Geant4)
481   include("${_geant4_thisdir}/Modules/IntelCom    590   include("${_geant4_thisdir}/Modules/IntelCompileFeatures.cmake")
482   include("${_geant4_thisdir}/Modules/MSVCComp    591   include("${_geant4_thisdir}/Modules/MSVCCompileFeatures.cmake")
483                                                   592 
484   if(NOT Geant4_LIBDEPS_LOADED)                   593   if(NOT Geant4_LIBDEPS_LOADED)
485     include("${_geant4_thisdir}/Geant4LibraryD    594     include("${_geant4_thisdir}/Geant4LibraryDepends.cmake")
486     set(Geant4_LIBDEPS_LOADED 1)                  595     set(Geant4_LIBDEPS_LOADED 1)
487   endif()                                         596   endif()
488 endif()                                           597 endif()
489                                                   598 
490 #---------------------------------------------    599 #-----------------------------------------------------------------------
491 # Now perform final configuration of libraries    600 # Now perform final configuration of libraries...
492 # We provide FOUND variables for presence of s    601 # We provide FOUND variables for presence of shared and static
493 # User can supply "static" component to force     602 # User can supply "static" component to force use of static libraries, if
494 # available.                                      603 # available.
495 set(Geant4_shared_FOUND @BUILD_SHARED_LIBS@)      604 set(Geant4_shared_FOUND @BUILD_SHARED_LIBS@)
496 set(Geant4_static_FOUND @BUILD_STATIC_LIBS@)      605 set(Geant4_static_FOUND @BUILD_STATIC_LIBS@)
497                                                   606 
498 # - Default setting : shared if available, sta    607 # - Default setting : shared if available, static otherwise
499 if(Geant4_shared_FOUND)                           608 if(Geant4_shared_FOUND)
500   set(_geant4_lib_use_suffix "")                  609   set(_geant4_lib_use_suffix "")
501 else()                                            610 else()
502   set(_geant4_lib_use_suffix "-static")           611   set(_geant4_lib_use_suffix "-static")
503 endif()                                           612 endif()
504                                                   613 
505 if(("static" IN_LIST Geant4_FIND_COMPONENTS) A    614 if(("static" IN_LIST Geant4_FIND_COMPONENTS) AND Geant4_static_FOUND)
506   set(_geant4_lib_use_suffix "-static")           615   set(_geant4_lib_use_suffix "-static")
507 endif()                                           616 endif()
508                                                   617 
509 # The list of libraries probably should be aut    618 # The list of libraries probably should be autogenerated, but we hard code
510 # for now. We don't have to divide the list of    619 # for now. We don't have to divide the list of shared libraries, but we
511 # do so for consistency with the way we'll nee    620 # do so for consistency with the way we'll need to do it for static.
512 # - Always on Vis Components                      621 # - Always on Vis Components
513 set(_geant4_internal_libraries                    622 set(_geant4_internal_libraries
514   Geant4::G4Tree${_geant4_lib_use_suffix}         623   Geant4::G4Tree${_geant4_lib_use_suffix}
515   Geant4::G4FR${_geant4_lib_use_suffix}           624   Geant4::G4FR${_geant4_lib_use_suffix}
516   Geant4::G4GMocren${_geant4_lib_use_suffix}      625   Geant4::G4GMocren${_geant4_lib_use_suffix}
517   Geant4::G4visHepRep${_geant4_lib_use_suffix}    626   Geant4::G4visHepRep${_geant4_lib_use_suffix}
518   Geant4::G4RayTracer${_geant4_lib_use_suffix}    627   Geant4::G4RayTracer${_geant4_lib_use_suffix}
519   Geant4::G4VRML${_geant4_lib_use_suffix}      << 628   Geant4::G4VRML${_geant4_lib_use_suffix})
520   Geant4::G4ToolsSG${_geant4_lib_use_suffix})  << 
521                                                   629 
522 # - G4OpenGL if it's requested.                   630 # - G4OpenGL if it's requested.
523 if(_geant4_use_opengl_library)                    631 if(_geant4_use_opengl_library)
524   list(APPEND _geant4_internal_libraries Geant << 632   list(APPEND _geant4_internal_libraries
                                                   >> 633     Geant4::G4OpenGL${_geant4_lib_use_suffix}
                                                   >> 634     Geant4::G4gl2ps${_geant4_lib_use_suffix})
                                                   >> 635   list(APPEND Geant4_DEFINITIONS -DG4VIS_USE_OPENGL)
525 endif()                                           636 endif()
526                                                   637 
527 # - Qt3D if it's requested.                       638 # - Qt3D if it's requested.
528 if(_geant4_use_qt3D_library)                      639 if(_geant4_use_qt3D_library)
529   list(APPEND _geant4_internal_libraries Geant    640   list(APPEND _geant4_internal_libraries Geant4::G4visQt3D${_geant4_lib_use_suffix})
                                                   >> 641   list(APPEND Geant4_DEFINITIONS -DG4VIS_USE_QT3D)
530 endif()                                           642 endif()
531                                                   643 
532 # - G4OpenInventor if it's requested.             644 # - G4OpenInventor if it's requested.
533 if(_geant4_use_inventor_library)                  645 if(_geant4_use_inventor_library)
534   list(APPEND _geant4_internal_libraries Geant    646   list(APPEND _geant4_internal_libraries Geant4::G4OpenInventor${_geant4_lib_use_suffix})
535 endif()                                           647 endif()
536                                                   648 
537 if(_geant4_use_vtk_library)                    << 649 # - G4ToolsSG if it's requested.
538   list(APPEND _geant4_internal_libraries Geant << 650 if(_geant4_use_toolssg_library)
                                                   >> 651   list(APPEND _geant4_internal_libraries Geant4::G4ToolsSG${_geant4_lib_use_suffix})
                                                   >> 652   list(APPEND Geant4_DEFINITIONS -DG4VIS_USE_TOOLSSG)
539 endif()                                           653 endif()
540                                                   654 
541 # - GDML always added for now as old G4persist << 655 if(_geant4_use_vtk_library)
542 if(Geant4_gdml_FOUND)                          << 656   list(APPEND _geant4_internal_libraries Geant4::G4visVtk${_geant4_lib_use_suffix})
543   set(_geant4_g4gdml_library Geant4::G4gdml${_ << 
544 endif()                                           657 endif()
545                                                   658 
546 # - G3toG4 if it's requested                      659 # - G3toG4 if it's requested
547 if(_geant4_use_g3tog4_library)                    660 if(_geant4_use_g3tog4_library)
548   set(_geant4_g3tog4_library Geant4::G3toG4${_    661   set(_geant4_g3tog4_library Geant4::G3toG4${_geant4_lib_use_suffix})
549 endif()                                           662 endif()
550                                                   663 
                                                   >> 664 # - link to timemory library if activated
                                                   >> 665 if(_geant4_use_timemory_library)
                                                   >> 666   list(APPEND _geant4_internal_libraries ${timemory_LIBRARIES})
                                                   >> 667 endif()
                                                   >> 668 
                                                   >> 669 # - Factory registration mechanism in physics_lists requires whole
                                                   >> 670 # archive to be linked when using static libs, so requires wrapping
                                                   >> 671 # with suitable compiler dependent flags
                                                   >> 672 # 2016-05-24: use an alternate means of forcing linking of references for
                                                   >> 673 # static builds.  --whole-archive never was implemented for _WIN32
                                                   >> 674 # (appears not to even be possible)
                                                   >> 675 # In order re-implement whole-archive, switch Geant4_FORCE_WHOLE_ARCHIVE ON
551 set(_geant4_physicslists_library Geant4::G4phy    676 set(_geant4_physicslists_library Geant4::G4physicslists${_geant4_lib_use_suffix})
552                                                   677 
                                                   >> 678 set(Geant4_FORCE_WHOLE_ARCHIVE OFF)
                                                   >> 679 if( Geant4_FORCE_WHOLE_ARCHIVE )
                                                   >> 680 if(_geant4_lib_use_suffix STREQUAL "-static")
                                                   >> 681   # - Use CMAKE_CXX_COMPILER_ID, which should be reliable enough...
                                                   >> 682   # Though the GNU/Clang/Intel compilers/linkers *should* use identical
                                                   >> 683   # flags,keep their sections separate until behaviour confirmed
                                                   >> 684   #
                                                   >> 685   if(CMAKE_CXX_COMPILER_ID MATCHES "GNU")
                                                   >> 686     set(_geant4_physicslists_library -Wl,--whole-archive Geant4::G4physicslists${_geant4_lib_use_suffix} -Wl,--no-whole-archive)
                                                   >> 687   elseif(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
                                                   >> 688     set(_geant4_physicslists_library -Wl,-force_load Geant4::G4physicslists${_geant4_lib_use_suffix})
                                                   >> 689   elseif(CMAKE_CXX_COMPILER_ID MATCHES "Intel")
                                                   >> 690     set(_geant4_physicslists_library -Wl,--whole-archive Geant4::G4physicslists${_geant4_lib_use_suffix} -Wl,--no-whole-archive)
                                                   >> 691   else()
                                                   >> 692     # Needs determination of other compiler options.
                                                   >> 693     # NB: MSVC has /OPT:NOREF, but may apply globally...
                                                   >> 694     # reading up on this ... doesn't seem that it applies for subtle reasons
                                                   >> 695     # only real way is to actually reference the static variables
                                                   >> 696     set(_geant4_physicslists_library Geant4::G4physicslists${_geant4_lib_use_suffix})
                                                   >> 697   endif()
                                                   >> 698 endif()
                                                   >> 699 endif()
                                                   >> 700 
553 # - 'Kernel' libraries                            701 # - 'Kernel' libraries
554 list(APPEND _geant4_internal_libraries            702 list(APPEND _geant4_internal_libraries
555   Geant4::G4vis_management${_geant4_lib_use_su    703   Geant4::G4vis_management${_geant4_lib_use_suffix}
556   Geant4::G4modeling${_geant4_lib_use_suffix}     704   Geant4::G4modeling${_geant4_lib_use_suffix}
557   Geant4::G4interfaces${_geant4_lib_use_suffix    705   Geant4::G4interfaces${_geant4_lib_use_suffix}
558   Geant4::G4mctruth${_geant4_lib_use_suffix}   << 706   Geant4::G4persistency${_geant4_lib_use_suffix}
559   Geant4::G4geomtext${_geant4_lib_use_suffix}  << 
560   ${_geant4_g4gdml_library}                    << 
561   ${_geant4_g3tog4_library}                       707   ${_geant4_g3tog4_library}
562   Geant4::G4analysis${_geant4_lib_use_suffix}     708   Geant4::G4analysis${_geant4_lib_use_suffix}
563   Geant4::G4error_propagation${_geant4_lib_use    709   Geant4::G4error_propagation${_geant4_lib_use_suffix}
564   Geant4::G4readout${_geant4_lib_use_suffix}      710   Geant4::G4readout${_geant4_lib_use_suffix}
565   ${_geant4_physicslists_library}                 711   ${_geant4_physicslists_library}
566   Geant4::G4run${_geant4_lib_use_suffix}          712   Geant4::G4run${_geant4_lib_use_suffix}
567   Geant4::G4event${_geant4_lib_use_suffix}        713   Geant4::G4event${_geant4_lib_use_suffix}
                                                   >> 714   Geant4::G4tasking${_geant4_lib_use_suffix}
568   Geant4::G4tracking${_geant4_lib_use_suffix}     715   Geant4::G4tracking${_geant4_lib_use_suffix}
569   Geant4::G4parmodels${_geant4_lib_use_suffix}    716   Geant4::G4parmodels${_geant4_lib_use_suffix}
570   Geant4::G4processes${_geant4_lib_use_suffix}    717   Geant4::G4processes${_geant4_lib_use_suffix}
571   Geant4::G4digits_hits${_geant4_lib_use_suffi    718   Geant4::G4digits_hits${_geant4_lib_use_suffix}
572   Geant4::G4track${_geant4_lib_use_suffix}        719   Geant4::G4track${_geant4_lib_use_suffix}
573   Geant4::G4particles${_geant4_lib_use_suffix}    720   Geant4::G4particles${_geant4_lib_use_suffix}
574   Geant4::G4geometry${_geant4_lib_use_suffix}     721   Geant4::G4geometry${_geant4_lib_use_suffix}
575   Geant4::G4materials${_geant4_lib_use_suffix}    722   Geant4::G4materials${_geant4_lib_use_suffix}
576   Geant4::G4graphics_reps${_geant4_lib_use_suf    723   Geant4::G4graphics_reps${_geant4_lib_use_suffix}
577   Geant4::G4intercoms${_geant4_lib_use_suffix}    724   Geant4::G4intercoms${_geant4_lib_use_suffix}
578   Geant4::G4global${_geant4_lib_use_suffix}       725   Geant4::G4global${_geant4_lib_use_suffix}
579   # G4tools is INTERFACE, so same for both sta << 726   Geant4::G4tools${_geant4_lib_use_suffix}
580   Geant4::G4tools                              << 
581   )                                               727   )
582                                                   728 
583 # - Any externals built by Geant4                 729 # - Any externals built by Geant4
584 foreach(_extlib @GEANT4_EXTERNALS_TARGETS@)       730 foreach(_extlib @GEANT4_EXTERNALS_TARGETS@)
585   list(APPEND                                     731   list(APPEND
586     _geant4_internal_libraries                    732     _geant4_internal_libraries
587     Geant4::${_extlib}${_geant4_lib_use_suffix    733     Geant4::${_extlib}${_geant4_lib_use_suffix}
588     )                                             734     )
589 endforeach()                                      735 endforeach()
590                                                   736 
591 # - Now set them to Geant4_LIBRARIES              737 # - Now set them to Geant4_LIBRARIES
592 set(Geant4_LIBRARIES ${_geant4_internal_librar    738 set(Geant4_LIBRARIES ${_geant4_internal_libraries})
593                                                   739 
594 #---------------------------------------------    740 #-----------------------------------------------------------------------
595 # Remove any duplicates from the Geant4_{INCLU << 741 # Remove any duplicates from the Geant4_{DEFINITIONS,INCLUDE_DIRS,LIBRARIES}
596 # variables so that multiple passes append thi    742 # variables so that multiple passes append things correctly
597 #                                                 743 #
                                                   >> 744 if(Geant4_DEFINITIONS)
                                                   >> 745   list(REMOVE_DUPLICATES Geant4_DEFINITIONS)
                                                   >> 746 endif()
                                                   >> 747 # -  Create an interface target to export the selected definitions as
                                                   >> 748 #    usage requirements
                                                   >> 749 if(NOT TARGET Geant4::G4UIVisDefinitions)
                                                   >> 750   add_library(Geant4::G4UIVisDefinitions INTERFACE IMPORTED)
                                                   >> 751 endif()
                                                   >> 752 string(REGEX REPLACE "^\-D|;-D" ";" G4UIVIS_COMPILE_DEFINITIONS "${Geant4_DEFINITIONS}")
                                                   >> 753 set_target_properties(Geant4::G4UIVisDefinitions PROPERTIES
                                                   >> 754   INTERFACE_COMPILE_DEFINITIONS "${G4UIVIS_COMPILE_DEFINITIONS}")
                                                   >> 755 unset(G4UIVIS_COMPILE_DEFINITIONS)
                                                   >> 756 
                                                   >> 757 list(APPEND Geant4_LIBRARIES Geant4::G4UIVisDefinitions)
                                                   >> 758 
598 if(Geant4_INCLUDE_DIRS)                           759 if(Geant4_INCLUDE_DIRS)
599   list(REMOVE_DUPLICATES Geant4_INCLUDE_DIRS)     760   list(REMOVE_DUPLICATES Geant4_INCLUDE_DIRS)
600 endif()                                           761 endif()
601                                                   762 
602 if(Geant4_LIBRARIES)                              763 if(Geant4_LIBRARIES)
603   list(REMOVE_DUPLICATES Geant4_LIBRARIES)        764   list(REMOVE_DUPLICATES Geant4_LIBRARIES)
604 endif()                                           765 endif()
605                                                   766 
606 #---------------------------------------------    767 #-----------------------------------------------------------------------
607 # Point the user to the UseGeant4.cmake file w    768 # Point the user to the UseGeant4.cmake file which they may wish to include
608 # to help them with setting up Geant4             769 # to help them with setting up Geant4
609 #                                                 770 #
610 set(Geant4_USE_FILE "${_geant4_thisdir}/UseGea    771 set(Geant4_USE_FILE "${_geant4_thisdir}/UseGeant4.cmake")
611                                                   772 
612 #---------------------------------------------    773 #-----------------------------------------------------------------------
613 # Pop our custom module path from the CMake on    774 # Pop our custom module path from the CMake one
614 list(REMOVE_AT CMAKE_MODULE_PATH 0)               775 list(REMOVE_AT CMAKE_MODULE_PATH 0)
615                                                   776 
616 #---------------------------------------------    777 #-----------------------------------------------------------------------
617 # Check FOUNDness of required components.         778 # Check FOUNDness of required components.
618 foreach(_comp ${Geant4_FIND_COMPONENTS})          779 foreach(_comp ${Geant4_FIND_COMPONENTS})
619   if(NOT Geant4_${_comp}_FOUND)                   780   if(NOT Geant4_${_comp}_FOUND)
620     if(Geant4_FIND_REQUIRED_${_comp})             781     if(Geant4_FIND_REQUIRED_${_comp})
621       message(WARNING "Geant4 required compone    782       message(WARNING "Geant4 required component '${_comp}' not found")
622       set(Geant4_FOUND FALSE)                     783       set(Geant4_FOUND FALSE)
623     endif()                                       784     endif()
624   endif()                                         785   endif()
625 endforeach()                                      786 endforeach()
626                                                   787 
627 #---------------------------------------------    788 #-----------------------------------------------------------------------
628 # Reporting via FindPackageHandleStandardArgs     789 # Reporting via FindPackageHandleStandardArgs "CONFIG_MODE" to give a better message on being found
629 include(FindPackageHandleStandardArgs)            790 include(FindPackageHandleStandardArgs)
630 set(${CMAKE_FIND_PACKAGE_NAME}_CONFIG "${CMAKE    791 set(${CMAKE_FIND_PACKAGE_NAME}_CONFIG "${CMAKE_CURRENT_LIST_FILE}")
631 find_package_handle_standard_args(@PROJECT_NAM    792 find_package_handle_standard_args(@PROJECT_NAME@ CONFIG_MODE)