Hi, I’m Lan, a begineer of Geant4.
I have build and installed Geant4 4-10_06 on Windows10 system with VS2019 and CMAKE. I also added QT when I build G4project with CMAKE. But when I was trying to make an example, CMAKE gave some error informarions like
Then I checked “Geant4PackageCache.cmake”, the code is
macro(geant4_set_and_check_package_variable _name _value _type _docstring)
if(DEFINED ${_name})
if(NOT ("${${_name}}" STREQUAL "${_value}"))
message(WARNING "Value of '${_name}' is already set and does not match value set at Geant4 build-time")
endif()
else()
set(${_name} ${_value} CACHE ${_type} "${_docstring}")
endif()
endmacro()
# Qt5 Build Time Settings
geant4_set_and_check_package_variable(Qt5Core_DIR "D:/QT/5.7/msvc2015_64/lib/cmake/Qt5Core" PATH "The directory containing a CMake configuration file for Qt5Core.")
geant4_set_and_check_package_variable(Qt5Gui_DIR "D:/QT/5.7/msvc2015_64/lib/cmake/Qt5Gui" PATH "The directory containing a CMake configuration file for Qt5Gui.")
geant4_set_and_check_package_variable(Qt5Widgets_DIR "D:/QT/5.7/msvc2015_64/lib/cmake/Qt5Widgets" PATH "The directory containing a CMake configuration file for Qt5Widgets.")
geant4_set_and_check_package_variable(Qt5OpenGL_DIR "D:/QT/5.7/msvc2015_64/lib/cmake/Qt5OpenGL" PATH "The directory containing a CMake configuration file for Qt5OpenGL.")
geant4_set_and_check_package_variable(Qt5PrintSupport_DIR "D:/QT/5.7/msvc2015_64/lib/cmake/Qt5PrintSupport" PATH "The directory containing a CMake configuration file for Qt5PrintSupport.")
# OpenGL Build Time Settings
geant4_set_and_check_package_variable(OPENGL_INCLUDE_DIR "" "")
geant4_set_and_check_package_variable(OPENGL_gl_LIBRARY "opengl32" STRING "OpenGL library for win32")
geant4_set_and_check_package_variable(OPENGL_glu_LIBRARY "glu32" STRING "GLU library for win32")
geant4_set_and_check_package_variable(OPENGL_gl_LIBRARY "opengl32" STRING "OpenGL library for win32")
geant4_set_and_check_package_variable(OPENGL_glu_LIBRARY "glu32" STRING "GLU library for win32")
geant4_set_and_check_package_variable(OPENGL_INCLUDE_DIR “” “”)
----I thought this problem is cmake can’t find openGL header file(?). But I don’t konw where to find this lost file. Dose any one know how to fix this problem? And I checked my computer, it is using DX12.
I will appreciate any advice, thanks in advance!