FindPike.cmake 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. # Distributed under the OSI-approved BSD 3-Clause License. See accompanying
  2. # file LICENSE.rst or https://cmake.org/licensing for details.
  3. #[=======================================================================[.rst:
  4. FindPike
  5. --------
  6. Finds the Pike compiler and interpreter:
  7. .. code-block:: cmake
  8. find_package(Pike [...])
  9. Pike is interpreted, general purpose, high-level, dynamic programming
  10. language.
  11. Result Variables
  12. ^^^^^^^^^^^^^^^^
  13. This module defines the following variables:
  14. ``Pike_FOUND``
  15. .. versionadded:: 4.2
  16. Boolean indicating whether Pike was found.
  17. Cache Variables
  18. ^^^^^^^^^^^^^^^
  19. The following cache variables may also be set:
  20. ``PIKE_INCLUDE_PATH``
  21. The directory containing ``program.h``.
  22. ``PIKE_EXECUTABLE``
  23. Full path to the pike binary.
  24. Examples
  25. ^^^^^^^^
  26. Finding Pike:
  27. .. code-block:: cmake
  28. find_package(Pike)
  29. #]=======================================================================]
  30. find_path(PIKE_INCLUDE_PATH program.h
  31. ${PIKE_POSSIBLE_INCLUDE_PATHS}
  32. PATH_SUFFIXES include/pike8.0/pike include/pike7.8/pike include/pike7.4/pike)
  33. find_program(PIKE_EXECUTABLE
  34. NAMES pike8.0 pike 7.8 pike7.4
  35. )
  36. mark_as_advanced(
  37. PIKE_EXECUTABLE
  38. PIKE_INCLUDE_PATH
  39. )
  40. if(PIKE_EXECUTABLE AND PIKE_INCLUDE_PATH)
  41. set(Pike_FOUND TRUE)
  42. else()
  43. set(Pike_FOUND FALSE)
  44. endif()