Commit 7642e330 authored by Brad King's avatar Brad King
Browse files

Python: Restore VTK version number to python libraries

The vtk_(add|module)_library macros set the OUTPUT_NAME property of the
target to add the VTK version number to the library file name.  Since
commit 1494cdd4 (Add python version numbers only to files, 2012-06-12)
we set the OUTPUT_NAME property of VTK Python library targets to add the
python version number, accidentally dropping the VTK version number.

Add the python version number by getting the OUTPUT_NAME property
value already set by vtk_add_library and replacing "Python" with
"Python${XY}".  Then set the OUTPUT_NAME property with the result.

Change-Id: Ie7ff1268162b077f7bd543df4b785dd49f1be02f
parent d7a3f376
......@@ -40,8 +40,9 @@ function(vtk_add_python_wrapping module_name module_srcs module_hdrs)
vtk_wrap_python3(${module_name}Python Python_SRCS "${_wrap_files}")
vtk_add_library(${module_name}PythonD ${Python_SRCS} ${extra_srcs})
set_target_properties(${module_name}PythonD
PROPERTIES OUTPUT_NAME ${module_name}Python${XY}D)
get_property(output_name TARGET ${module_name}PythonD PROPERTY OUTPUT_NAME)
string(REPLACE "PythonD" "Python${XY}D" output_name "${output_name}")
set_property(TARGET ${module_name}PythonD PROPERTY OUTPUT_NAME ${output_name})
if(CMAKE_HAS_TARGET_INCLUDES)
set_property(TARGET ${module_name}PythonD APPEND
PROPERTY INCLUDE_DIRECTORIES ${_python_include_dirs})
......
......@@ -49,8 +49,9 @@ set(${vtk-module}_NO_HeaderTest 1)
set(XY ${PYTHON_MAJOR_VERSION}${PYTHON_MINOR_VERSION})
vtk_module_library(vtkWrappingPython ${WrappingPython_SRCS})
set_target_properties(vtkWrappingPython
PROPERTIES OUTPUT_NAME vtkWrappingPython${XY})
get_property(output_name TARGET vtkWrappingPython PROPERTY OUTPUT_NAME)
string(REPLACE "Python" "Python${XY}" output_name "${output_name}")
set_property(TARGET vtkWrappingPython PROPERTY OUTPUT_NAME ${output_name})
target_link_libraries(vtkWrappingPython
${VTK_PYTHON_LIBRARIES})
target_link_libraries(vtkWrappingPython
......
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