summaryrefslogtreecommitdiffstats
path: root/Modules/FindPerl.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'Modules/FindPerl.cmake')
-rw-r--r--Modules/FindPerl.cmake7
1 files changed, 7 insertions, 0 deletions
diff --git a/Modules/FindPerl.cmake b/Modules/FindPerl.cmake
index fd120bf..c14e059 100644
--- a/Modules/FindPerl.cmake
+++ b/Modules/FindPerl.cmake
@@ -73,8 +73,15 @@ endif()
set(PERL ${PERL_EXECUTABLE})
include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
+if (CMAKE_FIND_PACKAGE_NAME STREQUAL "PerlLibs")
+ # FindPerlLibs include()'s this module. It's an old pattern, but rather than
+ # trying to suppress this from outside the module (which is then sensitive to
+ # the contents, detect the case in this module and suppress it explicitly.
+ set(FPHSA_NAME_MISMATCHED 1)
+endif ()
FIND_PACKAGE_HANDLE_STANDARD_ARGS(Perl
REQUIRED_VARS PERL_EXECUTABLE
VERSION_VAR PERL_VERSION_STRING)
+unset(FPHSA_NAME_MISMATCHED)
mark_as_advanced(PERL_EXECUTABLE)