Commit 623df7a5 authored by Brad King's avatar Brad King
Browse files

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

ENH: Updated wrapping commands to use new macros instead of CMake C++-implemented commands.  Also updated configuration of python wrappers to use separate module and shared library like the rest of VTK.
parent fd3c2180
......@@ -75,6 +75,11 @@ IF (VTK_WRAP_TCL)
"Wrap classes into the TCL interpreted language."
ON)
IF(VTKMY_WRAP_TCL)
SET(VTK_WRAP_TCL3_INIT_DIR "${VTKMY_SOURCE_DIR}/Wrapping")
INCLUDE(${VTK_CMAKE_DIR}/vtkWrapTcl.cmake)
ENDIF(VTKMY_WRAP_TCL)
ELSE (VTK_WRAP_TCL)
IF (VTKMY_WRAP_TCL)
......@@ -97,6 +102,8 @@ IF (VTK_WRAP_PYTHON)
ON)
IF (VTKMY_WRAP_PYTHON)
SET(VTK_WRAP_PYTHON3_INIT_DIR "${VTKMY_SOURCE_DIR}/Wrapping")
INCLUDE(${VTK_CMAKE_DIR}/vtkWrapPython.cmake)
IF (WIN32)
IF (NOT BUILD_SHARED_LIBS)
MESSAGE("Error. Python support requires BUILD_SHARED_LIBS to be ON.")
......@@ -127,6 +134,8 @@ IF (VTK_WRAP_JAVA)
ON)
IF (VTKMY_WRAP_JAVA)
SET(VTK_WRAP_JAVA3_INIT_DIR "${VTKMY_SOURCE_DIR}/Wrapping")
INCLUDE(${VTK_CMAKE_DIR}/vtkWrapJava.cmake)
IF (WIN32)
IF (NOT BUILD_SHARED_LIBS)
MESSAGE("Error. Java support requires BUILD_SHARED_LIBS to be ON.")
......
......@@ -17,29 +17,23 @@ TARGET_LINK_LIBRARIES (vtkmyCommon vtkCommon)
# Create the vtkmyCommon Tcl library.
IF (VTK_WRAP_TCL AND VTKMY_WRAP_TCL)
VTK_WRAP_TCL (vtkmyCommonTCL CommonTCL_SRCS ${Common_SRCS})
VTK_WRAP_TCL3 (vtkmyCommonTCL CommonTCL_SRCS "${Common_SRCS}" "")
ADD_LIBRARY (vtkmyCommonTCL ${CommonTCL_SRCS})
TARGET_LINK_LIBRARIES (vtkmyCommonTCL vtkmyCommon vtkCommonTCL)
ENDIF (VTK_WRAP_TCL AND VTKMY_WRAP_TCL)
# Create the vtkmyCommon Python library.
IF (VTK_WRAP_PYTHON AND VTKMY_WRAP_PYTHON)
VTK_WRAP_PYTHON (vtkmyCommonPython CommonPython_SRCS ${Common_SRCS})
IF (APPLE)
ADD_LIBRARY (vtkmyCommonPythonD ${CommonPython_SRCS})
ADD_LIBRARY (vtkmyCommonPython MODULE vtkmyCommonPythonInit.cxx)
TARGET_LINK_LIBRARIES(vtkmyCommonPythonD vtkmyCommon vtkCommon vtkCommonPythonD)
TARGET_LINK_LIBRARIES(vtkmyCommonPython vtkmyCommonPythonD)
INSTALL_TARGETS(/lib/vtk vtkmyCommonPythonD)
ELSE(APPLE)
ADD_LIBRARY (vtkmyCommonPython MODULE ${CommonPython_SRCS})
TARGET_LINK_LIBRARIES (vtkmyCommonPython vtkmyCommon vtkCommonPython)
ENDIF(APPLE)
VTK_WRAP_PYTHON3 (vtkmyCommonPython CommonPython_SRCS ${Common_SRCS})
ADD_LIBRARY (vtkmyCommonPythonD ${CommonPython_SRCS})
ADD_LIBRARY (vtkmyCommonPython MODULE vtkmyCommonPythonInit.cxx)
TARGET_LINK_LIBRARIES(vtkmyCommonPythonD vtkmyCommon vtkCommon vtkCommonPythonD)
TARGET_LINK_LIBRARIES(vtkmyCommonPython vtkmyCommonPythonD)
ENDIF (VTK_WRAP_PYTHON AND VTKMY_WRAP_PYTHON)
# Create the vtkmyCommon Java library.
IF (VTK_WRAP_JAVA AND VTKMY_WRAP_JAVA)
VTK_WRAP_JAVA (vtkmyCommonJava CommonJava_SRCS ${Common_SRCS})
VTK_WRAP_JAVA3 (vtkmyCommonJava CommonJava_SRCS ${Common_SRCS})
ADD_LIBRARY (vtkmyCommonJava SHARED ${CommonJava_SRCS})
TARGET_LINK_LIBRARIES (vtkmyCommonJava vtkmyCommon vtkCommonJava)
ENDIF (VTK_WRAP_JAVA AND VTKMY_WRAP_JAVA)
......@@ -17,29 +17,23 @@ TARGET_LINK_LIBRARIES(vtkmyImaging vtkmyCommon vtkImaging)
# Create the vtkmyImaging Tcl library
IF (VTK_WRAP_TCL AND VTKMY_WRAP_TCL)
VTK_WRAP_TCL (vtkmyImagingTCL ImagingTCL_SRCS ${Imaging_SRCS})
VTK_WRAP_TCL3 (vtkmyImagingTCL ImagingTCL_SRCS "${Imaging_SRCS}" "")
ADD_LIBRARY (vtkmyImagingTCL ${ImagingTCL_SRCS})
TARGET_LINK_LIBRARIES (vtkmyImagingTCL vtkmyCommonTCL vtkmyImaging vtkImagingTCL)
ENDIF (VTK_WRAP_TCL AND VTKMY_WRAP_TCL)
# Create the vtkmyImaging Python library.
IF (VTK_WRAP_PYTHON AND VTKMY_WRAP_PYTHON)
VTK_WRAP_PYTHON (vtkmyImagingPython ImagingPython_SRCS ${Imaging_SRCS})
IF (APPLE)
ADD_LIBRARY (vtkmyImagingPythonD ${ImagingPython_SRCS})
ADD_LIBRARY (vtkmyImagingPython MODULE vtkmyImagingPythonInit.cxx)
TARGET_LINK_LIBRARIES(vtkmyImagingPythonD vtkmyImaging vtkmyCommonPythonD vtkImaging vtkImagingPythonD)
TARGET_LINK_LIBRARIES(vtkmyImagingPython vtkmyImagingPythonD)
INSTALL_TARGETS(/lib/vtk vtkmyImagingPythonD)
ELSE(APPLE)
ADD_LIBRARY (vtkmyImagingPython MODULE ${ImagingPython_SRCS})
TARGET_LINK_LIBRARIES (vtkmyImagingPython vtkmyCommonPython vtkmyImaging)
ENDIF(APPLE)
VTK_WRAP_PYTHON3 (vtkmyImagingPython ImagingPython_SRCS ${Imaging_SRCS})
ADD_LIBRARY (vtkmyImagingPythonD ${ImagingPython_SRCS})
ADD_LIBRARY (vtkmyImagingPython MODULE vtkmyImagingPythonInit.cxx)
TARGET_LINK_LIBRARIES(vtkmyImagingPythonD vtkmyImaging vtkmyCommonPythonD vtkImaging vtkImagingPythonD)
TARGET_LINK_LIBRARIES(vtkmyImagingPython vtkmyImagingPythonD)
ENDIF (VTK_WRAP_PYTHON AND VTKMY_WRAP_PYTHON)
# Create the vtkmyImaging Java library.
IF (VTK_WRAP_JAVA AND VTKMY_WRAP_JAVA)
VTK_WRAP_JAVA (vtkmyImagingJava ImagingJava_SRCS ${Imaging_SRCS})
VTK_WRAP_JAVA3 (vtkmyImagingJava ImagingJava_SRCS ${Imaging_SRCS})
ADD_LIBRARY (vtkmyImagingJava SHARED ${ImagingJava_SRCS})
TARGET_LINK_LIBRARIES (vtkmyImagingJava vtkmyCommonJava vtkmyImaging vtkImagingJava)
ENDIF (VTK_WRAP_JAVA AND VTKMY_WRAP_JAVA)
......@@ -28,29 +28,23 @@ ENDIF (VTK_USE_RENDERING)
# Create the vtkmyUnsorted Tcl library.
IF (VTK_WRAP_TCL AND VTKMY_WRAP_TCL)
VTK_WRAP_TCL (vtkmyUnsortedTCL UnsortedTCL_SRCS ${Unsorted_SRCS})
VTK_WRAP_TCL3 (vtkmyUnsortedTCL UnsortedTCL_SRCS "${Unsorted_SRCS}" "")
ADD_LIBRARY (vtkmyUnsortedTCL ${UnsortedTCL_SRCS})
TARGET_LINK_LIBRARIES (vtkmyUnsortedTCL vtkmyCommonTCL vtkmyUnsorted)
ENDIF (VTK_WRAP_TCL AND VTKMY_WRAP_TCL)
# Create the vtkmyUnsorted Python library.
IF (VTK_WRAP_PYTHON AND VTKMY_WRAP_PYTHON)
VTK_WRAP_PYTHON (vtkmyUnsortedPython UnsortedPython_SRCS ${Unsorted_SRCS})
IF (APPLE)
ADD_LIBRARY (vtkmyUnsortedPythonD ${UnsortedPython_SRCS})
ADD_LIBRARY (vtkmyUnsortedPython MODULE vtkmyUnsortedPythonInit.cxx)
TARGET_LINK_LIBRARIES(vtkmyUnsortedPythonD vtkmyUnsorted vtkmyCommonPythonD)
TARGET_LINK_LIBRARIES(vtkmyUnsortedPython vtkmyUnsortedPythonD)
INSTALL_TARGETS(/lib/vtk vtkmyUnsortedPythonD)
ELSE(APPLE)
ADD_LIBRARY (vtkmyUnsortedPython MODULE ${UnsortedPython_SRCS})
TARGET_LINK_LIBRARIES (vtkmyUnsortedPython vtkmyCommonPython vtkmyUnsorted)
ENDIF(APPLE)
VTK_WRAP_PYTHON3 (vtkmyUnsortedPython UnsortedPython_SRCS ${Unsorted_SRCS})
ADD_LIBRARY (vtkmyUnsortedPythonD ${UnsortedPython_SRCS})
ADD_LIBRARY (vtkmyUnsortedPython MODULE vtkmyUnsortedPythonInit.cxx)
TARGET_LINK_LIBRARIES(vtkmyUnsortedPythonD vtkmyUnsorted vtkmyCommonPythonD)
TARGET_LINK_LIBRARIES(vtkmyUnsortedPython vtkmyUnsortedPythonD)
ENDIF (VTK_WRAP_PYTHON AND VTKMY_WRAP_PYTHON)
# Create the vtkmyUnsorted Java library.
IF (VTK_WRAP_JAVA AND VTKMY_WRAP_JAVA)
VTK_WRAP_JAVA (vtkmyUnsortedJava UnsortedJava_SRCS ${Unsorted_SRCS})
VTK_WRAP_JAVA3 (vtkmyUnsortedJava UnsortedJava_SRCS ${Unsorted_SRCS})
ADD_LIBRARY (vtkmyUnsortedJava SHARED ${UnsortedJava_SRCS})
TARGET_LINK_LIBRARIES(vtkmyUnsortedJava vtkmyCommonJava vtkmyUnsorted)
ENDIF (VTK_WRAP_JAVA AND VTKMY_WRAP_JAVA)
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