diff --git a/adm/cmake/occt_csf.cmake b/adm/cmake/occt_csf.cmake index bee8ba78d9..49e35d442b 100644 --- a/adm/cmake/occt_csf.cmake +++ b/adm/cmake/occt_csf.cmake @@ -82,6 +82,25 @@ else() set (CSF_Draco) endif() +# VTK +if (USE_VTK) + # the variable must to be empty, but keep there the list of libs + # that is used in the VTK component. + set (CSF_VTK + # vtkCommonCore + # vtkRenderingCore + # vtkRenderingFreeType + # vtkFiltersGeneral + # vtkIOImage + # vtkImagingCore + # vtkInteractionStyle + # vtkRenderingOpenGL + # vtkRenderingFreeTypeOpenGL + ) +else() + set (CSF_VTK) +endif() + if (WIN32) set (CSF_advapi32 "advapi32.lib") set (CSF_gdi32 "gdi32.lib") diff --git a/adm/cmake/vtk.cmake b/adm/cmake/vtk.cmake index 48650fe7df..c057007001 100644 --- a/adm/cmake/vtk.cmake +++ b/adm/cmake/vtk.cmake @@ -2,8 +2,14 @@ # vcpkg processing if (BUILD_USE_VCPKG) - find_package(VTK REQUIRED) - set(CSF_VTK VTK::CommonCore) + find_package(VTK REQUIRED + COMPONENTS + CommonCore + RenderingUI + RenderingOpenGL2 + OPTIONAL_COMPONENTS + mpi + ) set(IS_VTK_9XX 1) if (WIN32) set (USED_3RDPARTY_VTK_DIR "${VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/bin") @@ -74,7 +80,14 @@ if (3RDPARTY_VTK_DIR AND EXISTS "${3RDPARTY_VTK_DIR}") set (ENV{VTK_DIR} "${3RDPARTY_VTK_DIR}") endif() -find_package(VTK QUIET) +find_package(VTK QUIET + COMPONENTS + CommonCore + RenderingUI + RenderingOpenGL2 + OPTIONAL_COMPONENTS + mpi +) if (3RDPARTY_VTK_DIR AND EXISTS "${3RDPARTY_VTK_DIR}") set (ENV{VTK_DIR} ${CACHED_VTK_DIR})