Commit 7e33366b authored by Ben Boeckel's avatar Ben Boeckel Committed by Kitware Robot

Merge topic 'fix-optional-depends-kits'

720050cb vtkModule: fix kits linking with optional dependencies
Acked-by: Kitware Robot's avatarKitware Robot <>
Acked-by: T.J. Corona's avatarT.J. Corona <>
Reviewed-by: T.J. Corona's avatarT.J. Corona <>
Merge-request: !5141
parents 511d9267 720050cb
......@@ -2045,7 +2045,15 @@ function (vtk_module_build)
# private dependencies are actually linked.
get_property(_vtk_build_kit_module_private_depends GLOBAL
PROPERTY "_vtk_module_${_vtk_build_kit_module}_private_depends")
foreach (_vtk_build_kit_module_private_depend IN LISTS _vtk_build_kit_module_private_depends)
# Also grab optional dependencies since they end up being private
# links.
get_property(_vtk_build_kit_module_optional_depends GLOBAL
PROPERTY "_vtk_module_${_vtk_build_kit_module}_optional_depends")
foreach (_vtk_build_kit_module_private_depend IN LISTS _vtk_build_kit_module_private_depends _vtk_build_kit_module_optional_depends)
if (NOT TARGET "${_vtk_build_kit_module_private_depend}")
continue ()
endif ()
# But we don't need to link to modules that are part of the kit we are
# building.
list(FIND _vtk_build_kit_modules "${_vtk_build_kit_module_private_depend}" _vtk_build_idx)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment