Commit 179c7551 authored by Ben Boeckel's avatar Ben Boeckel
Browse files

Don't create an object library for Python wrapping

It requires CMake >= 2.8.8 and avoids duplication of ~5 lines of code
anyways, so it isn't needed.

Change-Id: Idbc6bf192a31692788cf7c259cd749b32f85a778
parent c782d2b9
......@@ -58,18 +58,10 @@ function(vtk_add_python_wrapping module_name)
target_link_libraries(${module_name}PythonD LINK_PUBLIC ${module_name}
vtkWrappingPythonCore ${extra_links} ${VTK_PYTHON_LIBRARIES})
add_library(${module_name}PythonInit OBJECT ${module_name}PythonInit.cxx)
set_property(TARGET ${module_name}PythonInit APPEND
PROPERTY INCLUDE_DIRECTORIES ${vtkCommonCore_INCLUDE_DIRS} ${PYTHON_INCLUDE_DIR})
if (NOT WIN32)
set_property(TARGET ${module_name}PythonInit APPEND
PROPERTY COMPILE_FLAGS "-fPIC")
endif()
_vtk_add_python_module(${module_name}Python ${module_name}PythonInit.cxx)
target_link_libraries(${module_name}Python ${module_name}PythonD)
if(CMAKE_HAS_TARGET_INCLUDES)
set_property(TARGET ${module_name}Python ${module_name}PythonInit APPEND
set_property(TARGET ${module_name}Python APPEND
PROPERTY INCLUDE_DIRECTORIES ${_python_include_dirs})
endif()
endfunction()
......
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