cmake: re-associate RuntimeLibraries component with python install rules

This commit fixes a regression introduced in 867d93c2 (Cleanup VTK's Python package.)
where the component associated with VTK python modules was set to "Runtime".

It restores the original behavior and ensures that project (e.g 3D Slicer)
installing specific components of VTK can package their dependencies as
expected.
parent 9a0449cc
......@@ -132,7 +132,7 @@ function(vtk_python_package name)
if (NOT _no_install AND NOT VTK_INSTALL_NO_RUNTIME)
install(DIRECTORY ${VTK_BUILD_PYTHON_MODULES_DIR}/${_name_target}/
DESTINATION ${VTK_INSTALL_PYTHON_MODULES_DIR}/${_name_target}
COMPONENT "Runtime"
COMPONENT RuntimeLibraries
# Add exclusions to avoid installing VTK's C++ Python modules
# These have their own install rules.
PATTERN "vtk*Python.so" EXCLUDE
......@@ -228,16 +228,16 @@ function (vtk_module_python_module name)
"${VTK_BUILD_PYTHON_MODULES_DIR}/${_name_we}.pyc"
"${VTK_BUILD_PYTHON_MODULES_DIR}/${_name_we}.pyo"
DESTINATION "${VTK_INSTALL_PYTHON_MODULES_DIR}"
COMPONENT "Runtime")
COMPONENT RuntimeLibraries)
else()
# python 3 uses a different directory for .pyc files, and .pyo files are gone.
install(FILES "${VTK_BUILD_PYTHON_MODULES_DIR}/${_name}"
DESTINATION "${VTK_INSTALL_PYTHON_MODULES_DIR}"
COMPONENT "Runtime")
COMPONENT RuntimeLibraries)
file(GLOB file_matches "${VTK_BUILD_PYTHON_MODULES_DIR}/__pycache__/${_name_we}.*.pyc")
install(FILES ${file_matches}
DESTINATION "${VTK_INSTALL_PYTHON_MODULES_DIR}/__pycache__"
COMPONENT "Runtime")
COMPONENT RuntimeLibraries)
endif()
endif()
endif() # NOT _use_system
......
......@@ -173,9 +173,9 @@ function(_vtk_add_python_module name)
PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${VTK_BUILD_PYTHON_MODULES_DIR}/vtk)
if (NOT VTK_INSTALL_NO_RUNTIME)
install(TARGETS ${name}
RUNTIME DESTINATION ${VTK_INSTALL_PYTHON_MODULES_DIR}/vtk
LIBRARY DESTINATION ${VTK_INSTALL_PYTHON_MODULES_DIR}/vtk
ARCHIVE DESTINATION ${VTK_INSTALL_ARCHIVE_DIR}
RUNTIME DESTINATION ${VTK_INSTALL_PYTHON_MODULES_DIR}/vtk COMPONENT RuntimeLibraries
LIBRARY DESTINATION ${VTK_INSTALL_PYTHON_MODULES_DIR}/vtk COMPONENT RuntimeLibraries
ARCHIVE DESTINATION ${VTK_INSTALL_ARCHIVE_DIR} COMPONENT Development
)
endif()
else ()
......
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