aboutsummaryrefslogtreecommitdiff
path: root/ports/vtk/fix-pugixml-link.patch
blob: aadd41adb89944312204788cb7681b61ccec87bf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
diff --git a/CMake/VTKConfig.cmake.in b/CMake/VTKConfig.cmake.in
index d28e0cc..7ed48bc 100644
--- a/CMake/VTKConfig.cmake.in
+++ b/CMake/VTKConfig.cmake.in
@@ -88,6 +88,9 @@ if(VTK_HAS_VTKM AND NOT TARGET vtkm_cont)
                )
 endif()
 
+# Find dependencies
+include(CMakeFindDependencyMacro)
+find_dependency(pugixml REQUIRED)
 
 #-----------------------------------------------------------------------------
 # Load requested modules.
diff --git a/IO/CityGML/CMakeLists.txt b/IO/CityGML/CMakeLists.txt
index ce979ba..744c6f1 100644
--- a/IO/CityGML/CMakeLists.txt
+++ b/IO/CityGML/CMakeLists.txt
@@ -4,8 +4,5 @@ vtk_module_library(vtkIOCityGML ${Module_SRCS})
 # pugixml does not set _INCLUDE_DIRS or _LIBRARIES
 if(VTK_USE_SYSTEM_PUGIXML AND NOT pugixml_INCLUDE_DIRS)
   find_package(pugixml REQUIRED)
-  get_target_property(pugixml_INCLUDE_DIRS pugixml INTERFACE_INCLUDE_DIRECTORIES)
-  get_target_property(pugixml_LIBRARIES pugixml LOCATION)
-  include_directories(${pugixml_INCLUDE_DIRS})
-  vtk_module_link_libraries(vtkIOCityGML LINK_PRIVATE ${pugixml_LIBRARIES})
+  vtk_module_link_libraries(vtkIOCityGML LINK_PUBLIC pugixml)
 endif()