FindGnuplot — CMake 4.3.0 Documentation

# FindGnuplot

Finds the Gnuplot command-line graphing utility for generating two- and three-dimensional plots (`gnuplot`):

    find_package(Gnuplot [<version>] [...])

## Result Variables

This module defines the following variables:

`Gnuplot_FOUND`

  Added in version 3.3.

  Boolean indicating whether (the requested version of) Gnuplot was found.

`Gnuplot_VERSION`

  Added in version 4.2.

  The version of Gnuplot found.

  Note

  Version detection is available only for Gnuplot 4 and later. Earlier versions did not provide version output.

## Cache Variables

The following cache variables may also be set:

`GNUPLOT_EXECUTABLE`

  Absolute path to the `gnuplot` executable.

## Deprecated Variables

The following variables are provided for backward compatibility:

`GNUPLOT_FOUND`

  Deprecated since version 4.2: Use `Gnuplot_FOUND`, which has the same value.

  Boolean indicating whether (the requested version of) Gnuplot was found.

`GNUPLOT_VERSION_STRING`

  Deprecated since version 4.2: Superseded by the `Gnuplot_VERSION`.

  The version of Gnuplot found.

## Examples

Finding Gnuplot and executing it in a process:

    find_package(Gnuplot)
    if(Gnuplot_FOUND)
      execute_process(COMMAND ${GNUPLOT_EXECUTABLE} --help)
    endif()