Commit 5f1e9f7a authored by Brad King's avatar Brad King
Browse files

ERR: Wrappers need to link to corresponding wrapper libraries for all VTK kits that are used.

parent d42b9a75
......@@ -27,6 +27,8 @@ INCLUDE_DIRECTORIES(${PROJECT_BINARY_DIR})
INCLUDE(${CMAKE_ROOT}/Modules/FindVTK.cmake)
IF(VTK_FOUND)
INCLUDE(${VTK_USE_FILE})
ELSE(VTK_FOUND)
MESSAGE(FATAL_ERROR "Set VTK_DIR.")
ENDIF(VTK_FOUND)
# Give user option of building shared or static libraries. Default to
......@@ -86,7 +88,10 @@ IF(VTK_FOUND)
IF(VTK_WRAP_TCL)
VTK_WRAP_TCL2(${PROJECT_NAME}TCL vtkLocalTCL_SRCS ${vtkLocal_SRCS})
ADD_LIBRARY(${PROJECT_NAME}TCL ${vtkLocalTCL_SRCS})
TARGET_LINK_LIBRARIES(${PROJECT_NAME}TCL vtkCommonTCL ${PROJECT_NAME})
TARGET_LINK_LIBRARIES(${PROJECT_NAME}TCL ${PROJECT_NAME})
FOREACH(c ${vtkLocal_LIBS})
TARGET_LINK_LIBRARIES(${PROJECT_NAME}TCL ${c}TCL)
ENDFOREACH(c)
# Create the list of kits that are required.
SET(VTKLOCAL_KITS "")
......@@ -116,8 +121,22 @@ 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})
ADD_LIBRARY(${PROJECT_NAME}Python MODULE ${vtkLocalPYTHON_SRCS})
TARGET_LINK_LIBRARIES(${PROJECT_NAME}Python vtkCommonPython ${PROJECT_NAME})
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)
ENDIF(VTK_WRAP_PYTHON)
# Create Java wrappers if VTK is wrapped in Java.
......@@ -127,7 +146,10 @@ IF(VTK_FOUND)
MAKE_DIRECTORY(${VTK_JAVA_HOME})
VTK_WRAP_JAVA2(${PROJECT_NAME}Java vtkLocalJAVA_SRCS ${vtkLocal_SRCS})
ADD_LIBRARY(${PROJECT_NAME}Java ${vtkLocalJAVA_SRCS})
TARGET_LINK_LIBRARIES(${PROJECT_NAME}Java vtkCommonJava ${PROJECT_NAME})
TARGET_LINK_LIBRARIES(${PROJECT_NAME}Java ${PROJECT_NAME})
FOREACH(c ${vtkLocal_LIBS})
TARGET_LINK_LIBRARIES(${PROJECT_NAME}Java ${c}Java)
ENDFOREACH(c)
ENDIF(VTK_WRAP_JAVA)
SUBDIRS(Testing)
......
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