FindTclStub

Finds the Tcl Stub Library, which is used for building version-independent Tcl extensions:

find_package(TclStub [...])

Tcl (Tool Command Language) is a dynamic programming language, and the Tcl Stub Library provides a mechanism to allow Tcl extensions to be compiled in a way that they can work across multiple Tcl versions, without requiring recompilation.

This module is typically used in conjunction with Tcl development projects that aim to be portable across different Tcl releases. It first calls the FindTCL module to locate Tcl installation and then attempts to find the stub libraries corresponding to the located Tcl version.

結果變數

該模組定義了以下變數:

TclStub_FOUND

在 4.2 版被加入.

Boolean indicating whether the Tcl Stub Library was found.

在 4.5 版的變更: This no longer depends on the Tk and ttk stub libraries being found.

快取變數

還可能設定以下變數:

TCL_STUB_LIBRARY

The path to the Tcl stub library.

TK_STUB_LIBRARY

The path to the Tk stub library, needed by extensions that use the Tk API.

TTK_STUB_LIBRARY

The path to a separate ttk stub library, if any. Standard Tk builds put the ttk stubs in the Tk stub library.

範例

Finding Tcl Stubs Library:

find_package(TclStub)

另請參見

  • The FindTCL module to find the Tcl installation.

  • The FindTclsh module to find the Tcl shell command-line executable.

Online references: