diff options
Diffstat (limited to 'Modules/FindPerl.cmake')
-rw-r--r-- | Modules/FindPerl.cmake | 21 |
1 files changed, 7 insertions, 14 deletions
diff --git a/Modules/FindPerl.cmake b/Modules/FindPerl.cmake index 1af301d..5772883 100644 --- a/Modules/FindPerl.cmake +++ b/Modules/FindPerl.cmake @@ -14,20 +14,13 @@ FIND_PROGRAM(PERL_EXECUTABLE ${CYGWIN_INSTALL_PATH}/bin ) -MARK_AS_ADVANCED( - PERL_EXECUTABLE - ) - -IF (NOT PERL_EXECUTABLE) - SET(PERL_FOUND "NO") -ELSE (NOT PERL_EXECUTABLE) - SET(PERL_FOUND "YES") - # Deprecated settings for compatibility with CMake1.4 - SET (PERL ${PERL_EXECUTABLE}) -ENDIF (NOT PERL_EXECUTABLE) +# Deprecated settings for compatibility with CMake1.4 +SET (PERL ${PERL_EXECUTABLE}) +# handle the QUIETLY and REQUIRED arguments and set PERL_FOUND to TRUE if +# all listed variables are TRUE +INCLUDE(FindPackageHandleStandardArgs) +FIND_PACKAGE_HANDLE_STANDARD_ARGS(Perl PERL_EXECUTABLE) -IF (NOT PERL_FOUND AND Perl_FIND_REQUIRED) - MESSAGE(FATAL_ERROR "Could not find Perl") -ENDIF (NOT PERL_FOUND AND Perl_FIND_REQUIRED) +MARK_AS_ADVANCED( PERL_EXECUTABLE ) |