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