vcpkg/ports/vtk/ot-dep.patch

34 lines
842 B
Diff
Raw Normal View History

diff --git a/Filters/OpenTURNS/CMakeLists.txt b/Filters/OpenTURNS/CMakeLists.txt
index 8bbc0cd..729e323 100644
--- a/Filters/OpenTURNS/CMakeLists.txt
+++ b/Filters/OpenTURNS/CMakeLists.txt
@@ -1,9 +1,11 @@
-find_package(OpenTURNS 1.8 REQUIRED)
+vtk_module_find_package( PRIVATE_IF_SHARED
+ PACKAGE OpenTURNS
+ VERSION 1.12
+)
-if (EXISTS "${OPENTURNS_USE_FILE}")
- # removed in 1.21
- include (${OPENTURNS_USE_FILE})
-endif ()
+if(NOT TARGET OT)
+ message(FATAL_ERROR "OpenTURNS OT target not available")
+endif()
set(classes
vtkOTDensityMap
@@ -28,8 +30,7 @@ vtk_module_add_module(VTK::FiltersOpenTURNS
vtk_module_link(VTK::FiltersOpenTURNS
PRIVATE
- ${OPENTURNS_LIBRARIES})
-vtk_module_include(VTK::FiltersOpenTURNS
- PRIVATE
- ${OPENTURNS_INCLUDE_DIRS})
+ OT
+)
+
vtk_add_test_mangling(VTK::FiltersOpenTURNS)