summaryrefslogtreecommitdiffstats
path: root/Modules/FindPerl.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'Modules/FindPerl.cmake')
-rw-r--r--Modules/FindPerl.cmake8
1 files changed, 6 insertions, 2 deletions
diff --git a/Modules/FindPerl.cmake b/Modules/FindPerl.cmake
index 3ee31fa..0ce3408 100644
--- a/Modules/FindPerl.cmake
+++ b/Modules/FindPerl.cmake
@@ -6,11 +6,15 @@
INCLUDE(FindCygwin)
+GET_FILENAME_COMPONENT(
+ ActivePerl_CurrentVersion
+ "[HKEY_LOCAL_MACHINE\\SOFTWARE\\ActiveState\\ActivePerl;CurrentVersion]"
+ NAME)
+
FIND_PROGRAM(PERL_EXECUTABLE
perl
"C:/Perl/bin"
- [HKEY_LOCAL_MACHINE\\SOFTWARE\\ActiveState\\ActivePerl\\804]/bin
- [HKEY_LOCAL_MACHINE\\SOFTWARE\\ActiveState\\ActivePerl\\628]/bin
+ [HKEY_LOCAL_MACHINE\\SOFTWARE\\ActiveState\\ActivePerl\\${ActivePerl_CurrentVersion}]/bin
${CYGWIN_INSTALL_PATH}/bin
)