<commit_before>CONFIGURE_FILE(
  ${VTK_SOURCE_DIR}/Wrapping/Tcl/vtkTkAppInitConfigure.h.in
  ${VTK_BINARY_DIR}/Wrapping/Tcl/vtkTkAppInitConfigure.h
  @ONLY IMMEDIATE
)

IF (NOT TCL_LIBRARY)
  MESSAGE("VTK_WRAP_TCL is ON, but the Tcl library was not found.  Please set TCL_LIBRARY." "Error")
ENDIF (NOT TCL_LIBRARY)

IF (WIN32)
  VTK_GET_TCL_TK_VERSION ("TCL_TK_MAJOR_VERSION" "TCL_TK_MINOR_VERSION")
  IF (TCL_TK_MAJOR_VERSION AND TCL_TK_MINOR_VERSION)
    SET (TK_RESOURCE_FILE_TRY 
         "${VTK_SOURCE_DIR}/Utilities/TclTk/resources/tk${TCL_TK_MAJOR_VERSION}.${TCL_TK_MINOR_VERSION}/win/rc/tk.rc")
    IF (EXISTS ${TK_RESOURCE_FILE_TRY})
      SET(TK_RESOURCE_FILE ${TK_RESOURCE_FILE_TRY} CACHE INTERNAL 
	      "The tk.rc resource file required to add the proper resources to a Tk command-line interpreter (i.e. vtk.exe)")
    ENDIF (EXISTS ${TK_RESOURCE_FILE_TRY})
  ENDIF (TCL_TK_MAJOR_VERSION AND TCL_TK_MINOR_VERSION)
  IF (TK_RESOURCE_FILE)
    GET_FILENAME_COMPONENT(TK_RESOURCE_PATH ${TK_RESOURCE_FILE} PATH)
    INCLUDE_DIRECTORIES(${TK_RESOURCE_PATH})
    CONFIGURE_FILE(
      ${VTK_SOURCE_DIR}/Wrapping/Tcl/resources/vtk.rc.in
      ${VTK_BINARY_DIR}/Wrapping/Tcl/resources/vtk.rc
    )
    INCLUDE_DIRECTORIES("${CMAKE_CURRENT_SOURCE_DIR}/resources")
    SET(VTK_EXE_RESOURCE_FILES 
        "${VTK_BINARY_DIR}/Wrapping/Tcl/resources/vtk.rc")
  ENDIF (TK_RESOURCE_FILE)
ENDIF (WIN32)

# Create the vtk Tcl wrapper executable.
ADD_EXECUTABLE(vtk vtkTkAppInit.cxx ${VTK_EXE_RESOURCE_FILES})
TARGET_LINK_LIBRARIES (vtk
  vtkCommonTCL
  vtkFilteringTCL
  vtkGraphicsTCL<commit_msg>not resource for borland<commit_after>CONFIGURE_FILE(
  ${VTK_SOURCE_DIR}/Wrapping/Tcl/vtkTkAppInitConfigure.h.in
  ${VTK_BINARY_DIR}/Wrapping/Tcl/vtkTkAppInitConfigure.h
  @ONLY IMMEDIATE
)

IF (NOT TCL_LIBRARY)
  MESSAGE("VTK_WRAP_TCL is ON, but the Tcl library was not found.  Please set TCL_LIBRARY." "Error")
ENDIF (NOT TCL_LIBRARY)

IF (WIN32)
  IF (NOT BORLAND)
    VTK_GET_TCL_TK_VERSION ("TCL_TK_MAJOR_VERSION" "TCL_TK_MINOR_VERSION")
    IF (TCL_TK_MAJOR_VERSION AND TCL_TK_MINOR_VERSION)
      SET (TK_RESOURCE_FILE_TRY 
           "${VTK_SOURCE_DIR}/Utilities/TclTk/resources/tk${TCL_TK_MAJOR_VERSION}.${TCL_TK_MINOR_VERSION}/win/rc/tk.rc")
      IF (EXISTS ${TK_RESOURCE_FILE_TRY})
        SET(TK_RESOURCE_FILE ${TK_RESOURCE_FILE_TRY} CACHE INTERNAL 
	        "The tk.rc resource file required to add the proper resources to a Tk command-line interpreter (i.e. vtk.exe)")
      ENDIF (EXISTS ${TK_RESOURCE_FILE_TRY})
    ENDIF (TCL_TK_MAJOR_VERSION AND TCL_TK_MINOR_VERSION)
    IF (TK_RESOURCE_FILE)
      GET_FILENAME_COMPONENT(TK_RESOURCE_PATH ${TK_RESOURCE_FILE} PATH)
      INCLUDE_DIRECTORIES(${TK_RESOURCE_PATH})
      CONFIGURE_FILE(
        ${VTK_SOURCE_DIR}/Wrapping/Tcl/resources/vtk.rc.in
        ${VTK_BINARY_DIR}/Wrapping/Tcl/resources/vtk.rc)
      INCLUDE_DIRECTORIES("${CMAKE_CURRENT_SOURCE_DIR}/resources")
      SET(VTK_EXE_RESOURCE_FILES 
          "${VTK_BINARY_DIR}/Wrapping/Tcl/resources/vtk.rc")
    ENDIF (TK_RESOURCE_FILE)
  ENDIF (NOT BORLAND)
ENDIF (WIN32)

# Create the vtk Tcl wrapper executable.
ADD_EXECUTABLE(vtk vtkTkAppInit.cxx ${VTK_EXE_RESOURCE_FILES})
TARGET_LINK_LIBRARIES (vtk
  vtkCommonTCL
  vtkFilteringTCL
  vtkGraphicsTCL
{'fraction_non_alphanumeric': 0.09654750992972808, 'fraction_numerical': 0.002444240757714635, 'mean_word_length': 4.920433996383363, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1653563', 'n_tokens_mistral': 1421, 'n_tokens_neox': 1335, 'n_words': 204}