Commit 2f6111f1 authored by Dave DeMarle's avatar Dave DeMarle

export python module installation directory for reuse

for use by other vtk modules that make and install python modules

Change-Id: Ia043b89c540df6de6af713c7c634833ab4b1d718
parent beae7c64
......@@ -23,3 +23,10 @@ if(NOT VTK_INSTALL_NO_DEVELOPMENT)
COMPONENT Development
)
endif()
# Export location of python module dirs in install and build tree for every vtkpython module to use
# As long as those modules depend on vtkpython, they can retrieve and use these
set_property(GLOBAL PROPERTY VTK_PYMODULE_INSTALL_DIR
"${VTK_INSTALL_LIBRARY_DIR}/python${PYTHON_MAJOR_VERSION}.${PYTHON_MINOR_VERSION}/site-packages")
set_property(GLOBAL PROPERTY VTK_PYMODULE_BUILD_DIR
"${VTK_BINARY_DIR}/Wrapping/Python/")
......@@ -273,9 +273,7 @@ if(PYTHON_EXECUTABLE)
endif()
if (NOT VTK_INSTALL_NO_PYTHON)
set(pymodule_instdir
"${VTK_INSTALL_LIBRARY_DIR}/python${PYTHON_MAJOR_VERSION}.${PYTHON_MINOR_VERSION}/site-packages")
get_property(pymodule_instdir GLOBAL PROPERTY VTK_PYMODULE_INSTALL_DIR)
# Install python modules (.py and *.pyd)
install(DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/vtk"
DESTINATION ${pymodule_instdir} COMPONENT RuntimeLibraries
......
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