rename a_pid_fuzzy.order to a_pid_fuzzy.nrule
[liba.git] / cmake / FindGnuplot.cmake
blob00c8a09ba79667a150640dbd96b1cddfabb2495d
1 # .rst:
2 # FindGnuplot
3 # -----------
5 # Find gnuplot executable. http://www.gnuplot.info
7 # Result Variables
8 # ^^^^^^^^^^^^^^^^
10 # This module defines the following variables:
12 # ``GNUPLOT_FOUND``
14 # ``GNUPLOT_EXECUTABLE``
16 # ``GNUPLOT_VERSION``
18 include(${CMAKE_ROOT}/Modules/FindPackageHandleStandardArgs.cmake)
19 find_program(GNUPLOT_EXECUTABLE NAMES gnuplot pgnuplot wgnupl32)
20 mark_as_advanced(GNUPLOT_EXECUTABLE)
22 if(EXISTS "${GNUPLOT_EXECUTABLE}")
23   execute_process(COMMAND ${GNUPLOT_EXECUTABLE} --version OUTPUT_VARIABLE GNUPLOT_VERSION)
24   string(REGEX REPLACE "[^0-9]+([^\n ]+).*" "\\1" GNUPLOT_VERSION "${GNUPLOT_VERSION}")
25 endif()
27 find_package_handle_standard_args(Gnuplot
28   FOUND_VAR
29     GNUPLOT_FOUND
30   REQUIRED_VARS
31     GNUPLOT_EXECUTABLE
32   VERSION_VAR
33     GNUPLOT_VERSION