/usr/lib/cmake/paraview/vtkTclWrapping.cmake is in paraview-dev 5.0.1+dfsg1-4.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 | # Make sure we find the required Tcl components.
if(VTK_WRAP_TCL)
set(VTK_WRAP_TCL_FIND_LIBS 1)
include(vtkWrapTcl)
include(vtkWrapHierarchy)
endif()
function(vtk_add_tcl_wrapping module_name module_srcs module_hdrs)
if(NOT VTK_WRAP_TCL_INIT_EXE)
if (TARGET vtkWrapTclInit)
set(VTK_WRAP_TCL_INIT_EXE vtkWrapTclInit)
else()
message(FATAL_ERROR
"VTK_WRAP_TCL_INIT_EXE must be set before calling vtk_add_tcl_wrapping.")
endif()
endif()
# Need to add the Wrapping directory to the include directory
set(_tcl_include_dirs
${VTK_SOURCE_DIR}/Wrapping/Tcl
${VTK_BINARY_DIR}/Wrapping/Tcl
${TCL_INCLUDE_PATH})
if(NOT CMAKE_HAS_TARGET_INCLUDES)
include_directories(${_tcl_include_dirs})
endif()
# FIXME: These must be here for now, should be fixed in the wrap hierarchy stuff
if(NOT ${module_name}_EXCLUDE_FROM_WRAP_HIERARCHY)
set(KIT_HIERARCHY_FILE ${${module_name}_WRAP_HIERARCHY_FILE})
endif()
string(REGEX REPLACE "^vtk" "" kit_name "${module_name}")
set(KIT ${kit_name})
# FIXME: Terrible temporary hack - add in the extra source file for CommonCore
if(${module_name} STREQUAL "vtkCommonCore")
set(extra_srcs ${VTK_SOURCE_DIR}/Wrapping/Tcl/vtkTclUtil.cxx)
set(extra_links vtksys)
else()
unset(extra_srcs)
# This contains the vtkTclUtil class....
set(extra_links vtkCommonCoreTCL)
endif()
# Figure out the dependent Tcl libraries for the module
foreach(dep ${${vtk-module}_LINK_DEPENDS})
if(NOT "${vtk-module}" STREQUAL "${dep}")
if(NOT ${dep}_EXCLUDE_FROM_WRAPPING AND NOT "${${dep}_TCL_NAME}" STREQUAL "")
list(APPEND extra_links ${${dep}_TCL_NAME}TCL)
endif()
endif()
endforeach()
# Tcl will not accept module names with numbers in.
set(tcl_module ${${module_name}_TCL_NAME})
vtk_wrap_tcl3(${tcl_module}TCL Tcl_SRCS "${module_srcs}" "")
vtk_add_library(${tcl_module}TCL ${Tcl_SRCS} ${extra_srcs})
if(CMAKE_HAS_TARGET_INCLUDES)
set_property(TARGET ${tcl_module}TCL APPEND
PROPERTY INCLUDE_DIRECTORIES ${_tcl_include_dirs})
endif()
if(${module_name}_IMPLEMENTS)
set_property(TARGET ${tcl_module}TCL PROPERTY COMPILE_DEFINITIONS
"${module_name}_AUTOINIT=1(${module_name})")
endif()
target_link_libraries(${tcl_module}TCL LINK_PUBLIC ${module_name}
${extra_links} ${VTK_TCL_LIBRARIES})
endfunction()
|