Commit 4e036df9 authored by Brad King's avatar Brad King
Browse files

ENH: Updated wrapping commands to use new macros instead of loaded commands. ...

ENH: Updated wrapping commands to use new macros instead of loaded commands.  Also updated configuration of python wrappers to use separate module and shared library like the rest of VTK.
parent 623df7a5
......@@ -85,7 +85,9 @@ IF(VTK_FOUND)
# Create Tcl wrappers if VTK is wrapped in Tcl.
IF(VTK_WRAP_TCL)
VTK_WRAP_TCL2(${PROJECT_NAME}TCL vtkLocalTCL_SRCS ${vtkLocal_SRCS})
INCLUDE(${VTK_CMAKE_DIR}/vtkWrapTcl.cmake)
SET(VTK_WRAP_TCL3_INIT_DIR "${PROJECT_SOURCE_DIR}")
VTK_WRAP_TCL3(${PROJECT_NAME}TCL vtkLocalTCL_SRCS "${vtkLocal_SRCS}" "")
ADD_LIBRARY(${PROJECT_NAME}TCL ${vtkLocalTCL_SRCS})
TARGET_LINK_LIBRARIES(${PROJECT_NAME}TCL ${PROJECT_NAME})
FOREACH(c ${vtkLocal_LIBS})
......@@ -119,31 +121,26 @@ IF(VTK_FOUND)
# Create Python wrappers if VTK is wrapped in Python.
IF(VTK_WRAP_PYTHON)
VTK_WRAP_PYTHON2(${PROJECT_NAME}Python vtkLocalPYTHON_SRCS ${vtkLocal_SRCS})
IF (APPLE)
ADD_LIBRARY(${PROJECT_NAME}PythonD ${vtkLocalPYTHON_SRCS})
ADD_LIBRARY(${PROJECT_NAME}Python MODULE ${PROJECT_NAME}PythonInit.cxx)
TARGET_LINK_LIBRARIES(${PROJECT_NAME}PythonD ${PROJECT_NAME})
FOREACH(c ${vtkLocal_LIBS})
TARGET_LINK_LIBRARIES(${PROJECT_NAME}PythonD ${c}PythonD)
ENDFOREACH(c)
TARGET_LINK_LIBRARIES(${PROJECT_NAME}Python ${PROJECT_NAME}PythonD)
ELSE (APPLE)
ADD_LIBRARY(${PROJECT_NAME}Python MODULE ${vtkLocalPYTHON_SRCS})
TARGET_LINK_LIBRARIES (${PROJECT_NAME}Python ${PROJECT_NAME})
FOREACH(c ${vtkLocal_LIBS})
TARGET_LINK_LIBRARIES(${PROJECT_NAME}Python ${c}Python)
ENDFOREACH(c)
ENDIF(APPLE)
INCLUDE(${VTK_CMAKE_DIR}/vtkWrapPython.cmake)
SET(VTK_WRAP_PYTHON3_INIT_DIR "${PROJECT_SOURCE_DIR}")
VTK_WRAP_PYTHON3(${PROJECT_NAME}Python vtkLocalPYTHON_SRCS ${vtkLocal_SRCS})
ADD_LIBRARY(${PROJECT_NAME}PythonD ${vtkLocalPYTHON_SRCS})
ADD_LIBRARY(${PROJECT_NAME}Python MODULE ${PROJECT_NAME}PythonInit.cxx)
TARGET_LINK_LIBRARIES(${PROJECT_NAME}PythonD ${PROJECT_NAME})
FOREACH(c ${vtkLocal_LIBS})
TARGET_LINK_LIBRARIES(${PROJECT_NAME}PythonD ${c}PythonD)
ENDFOREACH(c)
TARGET_LINK_LIBRARIES(${PROJECT_NAME}Python ${PROJECT_NAME}PythonD)
ENDIF(VTK_WRAP_PYTHON)
# Create Java wrappers if VTK is wrapped in Java.
IF(VTK_WRAP_JAVA)
INCLUDE(${VTK_CMAKE_DIR}/vtkWrapJava.cmake)
SET(VTK_WRAP_JAVA3_INIT_DIR "${PROJECT_SOURCE_DIR}")
SET(VTK_WRAP_HINTS "${PROJECT_SOURCE_DIR}/hints")
SET(VTK_JAVA_HOME ${PROJECT_BINARY_DIR}/java/${PROJECT_NAME})
MAKE_DIRECTORY(${VTK_JAVA_HOME})
VTK_WRAP_JAVA2(${PROJECT_NAME}Java vtkLocalJAVA_SRCS ${vtkLocal_SRCS})
VTK_WRAP_JAVA3(${PROJECT_NAME}Java vtkLocalJAVA_SRCS ${vtkLocal_SRCS})
ADD_LIBRARY(${PROJECT_NAME}Java ${vtkLocalJAVA_SRCS})
TARGET_LINK_LIBRARIES(${PROJECT_NAME}Java ${PROJECT_NAME})
FOREACH(c ${vtkLocal_LIBS})
......
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