From b77a0039ee999627b8977929830a743eac60a014 Mon Sep 17 00:00:00 2001 From: Philippe FOUBERT Date: Tue, 20 Aug 2019 23:01:34 +0200 Subject: [PATCH] Merge pull request #15351 from philippefoubert:pr_ximea * Fix the detection of XIMEA on Windows (when it has been installed by another user with administrative privileges, for example). * Change the flow: we first try HKEY_CURRENT_USER key and, if empty, then try HKEY_LOCAL_MACHINE --- modules/videoio/cmake/detect_ximea.cmake | 3 +++ 1 file changed, 3 insertions(+) diff --git a/modules/videoio/cmake/detect_ximea.cmake b/modules/videoio/cmake/detect_ximea.cmake index 5e0521b599..aa37d30508 100644 --- a/modules/videoio/cmake/detect_ximea.cmake +++ b/modules/videoio/cmake/detect_ximea.cmake @@ -1,6 +1,9 @@ if(NOT HAVE_XIMEA) if(WIN32) get_filename_component(regpath "[HKEY_CURRENT_USER\\Software\\XIMEA\\CamSupport\\API;Path]" ABSOLUTE) + if(NOT EXISTS ${regpath}) + get_filename_component(regpath "[HKEY_LOCAL_MACHINE\\SOFTWARE\\XIMEA\\API_SoftwarePackage;Path]" ABSOLUTE) + endif() endif() if(X86_64) set(lib_dir "x64")