mirror of
https://github.com/Kitware/CMake.git
synced 2026-05-04 13:19:51 -05:00
FindTCL, FindTclStub: Update documentation
- Modules documentation synced with other similar find modules. - Added examples section. - Changelog notes refactored, and removed variables described separately. - FindTclStub: Changelog notes moved to FindTCL as they are more related to that module. - Updated links to O'Reilly and Tcl documentation pages.
This commit is contained in:
+81
-30
@@ -5,44 +5,95 @@
|
|||||||
FindTCL
|
FindTCL
|
||||||
-------
|
-------
|
||||||
|
|
||||||
TK_INTERNAL_PATH was removed.
|
Finds the Tcl (Tool Command Language), dynamic programming language.
|
||||||
|
|
||||||
This module finds if Tcl is installed and determines where the include
|
This module locates a Tcl installation, including its include directories and
|
||||||
files and libraries are. It also determines what the name of the
|
libraries, and determines the appropriate Tcl library name for linking. As part
|
||||||
library is. This code sets the following variables:
|
of the Tcl ecosystem, it also finds Tk, a GUI toolkit that provides a library of
|
||||||
|
basic widgets for building graphical user interfaces.
|
||||||
|
|
||||||
::
|
Result Variables
|
||||||
|
^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
TCL_FOUND = Tcl was found
|
This module defines the following variables:
|
||||||
TK_FOUND = Tk was found
|
|
||||||
TCLTK_FOUND = Tcl and Tk were found
|
|
||||||
TCL_LIBRARY = path to Tcl library (tcl tcl80)
|
|
||||||
TCL_INCLUDE_PATH = path to where tcl.h can be found
|
|
||||||
TCL_TCLSH = path to tclsh binary (tcl tcl80)
|
|
||||||
TK_LIBRARY = path to Tk library (tk tk80 etc)
|
|
||||||
TK_INCLUDE_PATH = path to where tk.h can be found
|
|
||||||
TK_WISH = full path to the wish executable
|
|
||||||
|
|
||||||
|
``TCL_FOUND``
|
||||||
|
Boolean indicating whether the Tcl is found.
|
||||||
|
``TK_FOUND``
|
||||||
|
Boolean indicating whether the Tk is found.
|
||||||
|
``TCLTK_FOUND``
|
||||||
|
Boolean indicating whether both Tcl and Tk are found.
|
||||||
|
|
||||||
|
Cache Variables
|
||||||
|
^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
In an effort to remove some clutter and clear up some issues for
|
The following cache variables may also be set:
|
||||||
people who are not necessarily Tcl/Tk gurus/developers, some
|
|
||||||
variables were moved or removed. Changes compared to CMake 2.4 are:
|
|
||||||
|
|
||||||
::
|
``TCL_LIBRARY``
|
||||||
|
The path to the Tcl library (e.g., ``tcl``, etc.).
|
||||||
|
``TCL_INCLUDE_PATH``
|
||||||
|
The directory containing ``tcl.h`` and other Tcl-related headers needed to use
|
||||||
|
Tcl.
|
||||||
|
``TCL_TCLSH``
|
||||||
|
The path to the ``tclsh`` command-line executable.
|
||||||
|
``TK_LIBRARY``
|
||||||
|
The path to the Tk library (e.g., ``tk``, etc.).
|
||||||
|
``TK_INCLUDE_PATH``
|
||||||
|
The directory containing ``tk.h`` and other Tk-related headers needed to use
|
||||||
|
Tk.
|
||||||
|
``TK_WISH``
|
||||||
|
The path to the ``wish`` windowing shell command-line executable.
|
||||||
|
|
||||||
=> they were only useful for people writing Tcl/Tk extensions.
|
Changelog
|
||||||
=> these libs are not packaged by default with Tcl/Tk distributions.
|
^^^^^^^^^
|
||||||
Even when Tcl/Tk is built from source, several flavors of debug libs
|
|
||||||
are created and there is no real reason to pick a single one
|
.. versionchanged:: 2.6
|
||||||
specifically (say, amongst tcl84g, tcl84gs, or tcl84sgx).
|
|
||||||
Let's leave that choice to the user by allowing him to assign
|
To reduce clutter and clarify usage for users who are not Tcl/Tk experts, some
|
||||||
TCL_LIBRARY to any Tcl library, debug or not.
|
variables have been removed or relocated. Many of the previous variables were
|
||||||
=> this ended up being only a Win32 variable, and there is a lot of
|
primarily useful only when writing Tcl/Tk extensions.
|
||||||
confusion regarding the location of this file in an installed Tcl/Tk
|
|
||||||
tree anyway (see 8.5 for example). If you need the internal path at
|
* The Tcl Stub Library can now be found using the separate
|
||||||
this point it is safer you ask directly where the *source* tree is
|
:module:`FindTclStub` module.
|
||||||
and dig from there.
|
|
||||||
|
* The ``TCL_STUB_LIBRARY_DEBUG`` and ``TK_STUB_LIBRARY_DEBUG`` cache variables
|
||||||
|
have been removed. They provided a path to the debug variant of the Tcl
|
||||||
|
Stub Library.
|
||||||
|
|
||||||
|
The extension-related libraries are not typically packaged with standard
|
||||||
|
Tcl/Tk distributions. Even when building Tcl/Tk from source, several debug
|
||||||
|
variants (e.g., ``tcl84g``, ``tcl84gs``, ``tcl84sgx``, ``tclstub84g``,
|
||||||
|
``tclstub84gs``, or ``tclstub84sgx``) may be produced.
|
||||||
|
|
||||||
|
Rather than enforcing one specific variant, users are now free to set
|
||||||
|
``TCL_LIBRARY`` to any desired variant (debug or release) when using this
|
||||||
|
module, and ``TCL_STUB_LIBRARY`` to any desired variant via the
|
||||||
|
:module:`FindTclStub` module.
|
||||||
|
|
||||||
|
* The ``TK_INTERNAL_PATH`` cache variable has been removed. It specified the
|
||||||
|
directory containing the ``tkWinInt.h`` header file.
|
||||||
|
|
||||||
|
This variable was Windows-specific and often caused confusion regarding file
|
||||||
|
locations within Tcl/Tk installation trees (as seen with version 8.5). When
|
||||||
|
internal paths are needed, it's now safer to locate the Tcl/Tk source tree
|
||||||
|
directly, or use the ``TK_INCLUDE_PATH`` variable instead.
|
||||||
|
|
||||||
|
Examples
|
||||||
|
^^^^^^^^
|
||||||
|
|
||||||
|
Finding Tcl:
|
||||||
|
|
||||||
|
.. code-block:: cmake
|
||||||
|
|
||||||
|
find_package(TCL)
|
||||||
|
|
||||||
|
See Also
|
||||||
|
^^^^^^^^
|
||||||
|
|
||||||
|
* The :module:`FindTclsh` module to find the Tcl shell command-line executable.
|
||||||
|
* The :module:`FindTclStub` module to find the Tcl Stubs Library.
|
||||||
|
* The :module:`FindWish` module to find the ``wish`` windowing shell
|
||||||
|
command-line executable .
|
||||||
#]=======================================================================]
|
#]=======================================================================]
|
||||||
|
|
||||||
block(SCOPE_FOR POLICIES)
|
block(SCOPE_FOR POLICIES)
|
||||||
|
|||||||
+33
-24
@@ -5,44 +5,53 @@
|
|||||||
FindTclStub
|
FindTclStub
|
||||||
-----------
|
-----------
|
||||||
|
|
||||||
TCL_STUB_LIBRARY_DEBUG and TK_STUB_LIBRARY_DEBUG were removed.
|
Finds the Tcl Stub Library, which is used for building version-independent Tcl
|
||||||
|
extensions.
|
||||||
|
|
||||||
This module finds Tcl stub libraries. It first finds Tcl include
|
Tcl (Tool Command Language) is a dynamic programming language, and the Tcl Stub
|
||||||
files and libraries by calling FindTCL.cmake. How to Use the Tcl
|
Library provides a mechanism to allow Tcl extensions to be compiled in a way
|
||||||
Stubs Library:
|
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
|
||||||
|
:module:`FindTCL` module to locate Tcl installation and then attempts to find
|
||||||
|
the stub libraries corresponding to the located Tcl version.
|
||||||
|
|
||||||
http://tcl.activestate.com/doc/howto/stubs.html
|
Cache Variables
|
||||||
|
^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
Using Stub Libraries:
|
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.
|
||||||
|
|
||||||
http://safari.oreilly.com/0130385603/ch48lev1sec3
|
Examples
|
||||||
|
^^^^^^^^
|
||||||
|
|
||||||
This code sets the following variables:
|
Finding Tcl Stubs Library:
|
||||||
|
|
||||||
::
|
.. code-block:: cmake
|
||||||
|
|
||||||
TCL_STUB_LIBRARY = path to Tcl stub library
|
find_package(TclStub)
|
||||||
TK_STUB_LIBRARY = path to Tk stub library
|
|
||||||
TTK_STUB_LIBRARY = path to ttk stub library
|
|
||||||
|
|
||||||
|
See Also
|
||||||
|
^^^^^^^^
|
||||||
|
|
||||||
|
* The :module:`FindTCL` module to find the Tcl installation.
|
||||||
|
* The :module:`FindTclsh` module to find the Tcl shell command-line executable.
|
||||||
|
|
||||||
In an effort to remove some clutter and clear up some issues for
|
Online references:
|
||||||
people who are not necessarily Tcl/Tk gurus/developers, some
|
|
||||||
variables were moved or removed. Changes compared to CMake 2.4 are:
|
|
||||||
|
|
||||||
::
|
* `How to Use the Tcl Stubs Library
|
||||||
|
<https://www.tcl-lang.org/doc/howto/stubs.html>`_
|
||||||
|
|
||||||
=> these libs are not packaged by default with Tcl/Tk distributions.
|
* `Practical Programming in Tcl and Tk
|
||||||
Even when Tcl/Tk is built from source, several flavors of debug libs
|
<https://www.oreilly.com/library/view/practical-programming-in/0130385603/>`_
|
||||||
are created and there is no real reason to pick a single one
|
|
||||||
specifically (say, amongst tclstub84g, tclstub84gs, or tclstub84sgx).
|
|
||||||
Let's leave that choice to the user by allowing him to assign
|
|
||||||
TCL_STUB_LIBRARY to any Tcl library, debug or not.
|
|
||||||
#]=======================================================================]
|
#]=======================================================================]
|
||||||
|
|
||||||
include(${CMAKE_CURRENT_LIST_DIR}/FindTCL.cmake)
|
include(${CMAKE_CURRENT_LIST_DIR}/FindTCL.cmake)
|
||||||
|
|||||||
Reference in New Issue
Block a user