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.
Result Variables
This module defines the following variables:
-
TclStub_FOUND -
Added in version 4.2.
Boolean indicating whether the Tcl Stub Library was found.
Cache Variables
The following cache variables may also be set:
-
TCL_STUB_LIBRARY -
The path to the Tcl stub library.
-
TK_STUB_LIBRARY -
The path to the Tk stub library.
-
TTK_STUB_LIBRARY -
The path to the ttk stub library.
Examples
Finding Tcl Stubs Library:
find_package(TclStub)
See Also
- The
FindTCLmodule to find the Tcl installation. - The
FindTclshmodule to find the Tcl shell command-line executable.
Online references:
© 2000–2026 Kitware, Inc. and Contributors
Licensed under the BSD 3-clause License.
https://cmake.org/cmake/help/latest/module/FindTclStub.html