FindPerl.cmake 990 B

12345678910111213141516171819202122232425262728293031323334353637
  1. # - Find perl
  2. # this module looks for Perl
  3. #
  4. # PERL_EXECUTABLE - the full path to perl
  5. # PERL_FOUND - If false, don't attempt to use perl.
  6. INCLUDE(FindCygwin)
  7. SET(PERL_POSSIBLE_BIN_PATHS
  8. ${CYGWIN_INSTALL_PATH}/bin
  9. )
  10. IF(WIN32)
  11. GET_FILENAME_COMPONENT(
  12. ActivePerl_CurrentVersion
  13. "[HKEY_LOCAL_MACHINE\\SOFTWARE\\ActiveState\\ActivePerl;CurrentVersion]"
  14. NAME)
  15. SET(PERL_POSSIBLE_BIN_PATHS ${PERL_POSSIBLE_BIN_PATHS}
  16. "C:/Perl/bin"
  17. [HKEY_LOCAL_MACHINE\\SOFTWARE\\ActiveState\\ActivePerl\\${ActivePerl_CurrentVersion}]/bin
  18. )
  19. ENDIF(WIN32)
  20. FIND_PROGRAM(PERL_EXECUTABLE
  21. NAMES perl
  22. PATHS ${PERL_POSSIBLE_BIN_PATHS}
  23. )
  24. # Deprecated settings for compatibility with CMake1.4
  25. SET(PERL ${PERL_EXECUTABLE})
  26. # handle the QUIETLY and REQUIRED arguments and set PERL_FOUND to TRUE if
  27. # all listed variables are TRUE
  28. INCLUDE(FindPackageHandleStandardArgs)
  29. FIND_PACKAGE_HANDLE_STANDARD_ARGS(Perl DEFAULT_MSG PERL_EXECUTABLE)
  30. MARK_AS_ADVANCED(PERL_EXECUTABLE)