[CMake] Language Dependency for TCL?

frodak17 frodak17 at gmail.com
Fri May 17 10:00:43 EDT 2019


On Thu, May 16, 2019 at 5:05 PM hex <hex7c3 at gmail.com> wrote:

> hello,
>
> I am setting up a TCL project so I disabled all language variables:
>
> *cmake_minimum_required(VERSION 2.4)*
>
> *project(P LANGUAGES NONE)*
> *find_package(TCL)*
>
>
> however, this fails with
>
> *-- Could NOT find TCL (missing: TCL_LIBRARY) *
> *-- Could NOT find TCLTK (missing: TCL_LIBRARY TK_LIBRARY) *
> *-- Could NOT find TK (missing: TK_LIBRARY) *
>
>
> If I instead add languages to the project the TCL package works. This
> makes me wonder what dependencies TCL has with standard languages. Is the
> package incomplete? Why do I need to use a language that I do not intend to
> use?
>
> for example:
>
> *cmake_minimum_required(VERSION 2.4)*
>
> *project(P LANGUAGES C)*
> *find_package(TCL)*
>
> *-- Found Tclsh: /usr/bin/tclsh (found version "8.6") *
> *-- Found TCL: /usr/lib/x86_64-linux-gnu/libtcl.so  *
> *-- Found TCLTK: /usr/lib/x86_64-linux-gnu/libtcl.so  *
> *-- Found TK: /usr/lib/x86_64-linux-gnu/libtk.so  *
>
>
> thank you
> --
>
>
Probably because the following isn't properly set if you don't enable a
language:
CMAKE_FIND_LIBRARY_SUFFIXES
CMAKE_FIND_LIBRARY_PREFIXES

You could probably just use "find_package(Tclsh)" to just find the shell.
https://cmake.org/cmake/help/v3.14/module/FindTclsh.html
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://cmake.org/pipermail/cmake/attachments/20190517/ca03eb88/attachment-0001.html>


More information about the CMake mailing list