diff options
author | Marc Chevrier <marc.chevrier@gmail.com> | 2018-05-05 13:45:57 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2018-05-07 13:40:55 (GMT) |
commit | b4e156931511777ffb1b512a6b21e88b02d6bd43 (patch) | |
tree | ba233b0429ecd531ec7abc5a01221d2f4aaa7290 /Modules/FindJNI.cmake | |
parent | 1013560a6a7c34d7f268eacf12ffdb4874a70c8b (diff) | |
download | CMake-b4e156931511777ffb1b512a6b21e88b02d6bd43.zip CMake-b4e156931511777ffb1b512a6b21e88b02d6bd43.tar.gz CMake-b4e156931511777ffb1b512a6b21e88b02d6bd43.tar.bz2 |
FindJava, FindJNI: fix erroneous regex, enhance registry lookup
Diffstat (limited to 'Modules/FindJNI.cmake')
-rw-r--r-- | Modules/FindJNI.cmake | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Modules/FindJNI.cmake b/Modules/FindJNI.cmake index ff8d353..4913e05 100644 --- a/Modules/FindJNI.cmake +++ b/Modules/FindJNI.cmake @@ -128,7 +128,7 @@ if (WIN32) OUTPUT_VARIABLE _JNI_VERSIONS ERROR_QUIET) if (NOT _JNI_RESULT) - string (REGEX MATCHALL "HKEY_LOCAL_MACHINE\\\\SOFTWARE\\\\JavaSoft\\\\JDK\\\\[0-9\.]+" _JNI_VERSIONS "${_JNI_VERSIONS}") + string (REGEX MATCHALL "HKEY_LOCAL_MACHINE\\\\SOFTWARE\\\\JavaSoft\\\\JDK\\\\[0-9.]+" _JNI_VERSIONS "${_JNI_VERSIONS}") if (_JNI_VERSIONS) # sort versions. Most recent first ## handle version 9 apart from other versions to get correct ordering @@ -141,7 +141,7 @@ if (WIN32) list (REVERSE _JNI_V9) list (APPEND _JNI_VERSIONS ${_JNI_V9}) foreach (_JNI_HINT IN LISTS _JNI_VERSIONS) - list(APPEND _JNI_HINTS "[${_JNI_HINT}\\MSI;INSTALLDIR]") + list(APPEND _JNI_HINTS "[${_JNI_HINT};JavaHome]") endforeach() endif() endif() |