aboutsummaryrefslogtreecommitdiff
path: root/ports/vtk/transfer-3rd-party-module-definitions.patch
blob: 7b402892fa495692a3e605c418b06aae160757dc (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
--- a/CMake/vtkModuleMacros.cmake	Mon Nov 14 17:59:47 2016
+++ b/CMake/vtkModuleMacros.cmake	Thu Jan 05 21:36:06 2017
@@ -665,6 +665,9 @@
     if(${dep}_LIBRARY_DIRS)
       link_directories(${${dep}_LIBRARY_DIRS})
     endif()
+    if(${dep}_DEFINITIONS)
+      target_compile_definitions(${vtk-module} PRIVATE ${${dep}_DEFINITIONS})
+    endif()
     vtk_module_link_libraries(${vtk-module} LINK_PRIVATE ${${dep}_LIBRARIES})
     if(_help_vs7 AND ${dep}_LIBRARIES)
       add_dependencies(${vtk-module} ${${dep}_LIBRARIES})
@@ -870,6 +873,13 @@
       set(vtk${_lower}_LIBRARIES "${${_pkg}_LIBRARIES}")
     else()
       set(vtk${_lower}_LIBRARIES "${${_upper}_LIBRARIES}")
+    endif()
+    if(${_pkg}_DEFINITIONS)
+      set(vtk${_lower}_DEFINITIONS ${${_pkg}_DEFINITIONS})
+    elseif(${_upper}_DEFINITIONS)
+      set(vtk${_lower}_DEFINITIONS ${${_upper}_DEFINITIONS})
+    else()
+      set(vtk${_lower}_DEFINITIONS ${${_upper}_DEFINITIONS})
     endif()
 
     #a workaround for bad FindHDF5 behavior in which deb or opt can