vcpkg/ports/vtk/transfer-3rd-party-module-definitions.patch

27 lines
1.0 KiB
Diff
Raw Normal View History

2017-01-12 18:03:02 +08:00
--- 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