add Qt viewport
This commit is contained in:
@@ -9,6 +9,8 @@ endif()
|
||||
|
||||
cmake_minimum_required (VERSION 3.26)
|
||||
|
||||
set(QT_NO_VERSION_CHECK TRUE)
|
||||
|
||||
if(POLICY CMP0167)
|
||||
cmake_policy(SET CMP0167 NEW)
|
||||
endif()
|
||||
@@ -125,18 +127,12 @@ find_package(ROOT CONFIG REQUIRED)
|
||||
include(${ROOT_USE_FILE})
|
||||
|
||||
find_package(VTK REQUIRED)
|
||||
# include(${VTK_USE_FILE})
|
||||
|
||||
set(GEANT4_USE_HDF5 OFF CACHE BOOL "Use HDF5" FORCE)
|
||||
find_package(Geant4 REQUIRED)
|
||||
|
||||
find_package(pybind11 REQUIRED)
|
||||
|
||||
|
||||
option(CENTOS_SUPPORT "VTK definitions for CentOS" OFF)
|
||||
if(CENTOS_SUPPORT)
|
||||
find_package(VTK CONFIG REQUIRED)
|
||||
include(${VTK_USE_FILE})
|
||||
# include(${VTK_USE_FILE})
|
||||
else()
|
||||
find_package(VTK REQUIRED
|
||||
COMPONENTS CommonColor
|
||||
@@ -157,7 +153,25 @@ else()
|
||||
RenderingGL2PSOpenGL2
|
||||
RenderingOpenGL2
|
||||
RenderingVolumeOpenGL2
|
||||
IOGeometry)
|
||||
IOGeometry
|
||||
GUISupportQt)
|
||||
endif()
|
||||
|
||||
find_package(Qt6 COMPONENTS Widgets REQUIRED)
|
||||
|
||||
find_package(Geant4 REQUIRED)
|
||||
message(STATUS "Geant4 libs: ${Geant4_LIBRARIES}")
|
||||
|
||||
# Sanitize Geant4 targets to remove Qt5 dependencies that conflict with VTK/Qt6
|
||||
if(TARGET Geant4::G4interfaces)
|
||||
set_target_properties(Geant4::G4interfaces PROPERTIES
|
||||
INTERFACE_LINK_LIBRARIES "Geant4::G4global;Geant4::G4graphics_reps;Geant4::G4intercoms"
|
||||
)
|
||||
endif()
|
||||
if(TARGET Geant4::G4OpenGL)
|
||||
set_target_properties(Geant4::G4OpenGL PROPERTIES
|
||||
INTERFACE_LINK_LIBRARIES "Geant4::G4vis_management;Geant4::G4graphics_reps;Geant4::G4geometry;Geant4::G4materials;Geant4::G4intercoms;Geant4::G4global;OpenGL::GL;OpenGL::GLU"
|
||||
)
|
||||
endif()
|
||||
|
||||
set(CMAKE_REQUIRED_INCLUDES CMAKE_REQUIRED_INCLUDES math.h)
|
||||
|
||||
Reference in New Issue
Block a user