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
This commit is contained in:
Philippe FOUBERT 2019-08-20 23:01:34 +02:00 committed by Alexander Alekhin
parent b2274a63cd
commit b77a0039ee

View File

@ -1,6 +1,9 @@
if(NOT HAVE_XIMEA) if(NOT HAVE_XIMEA)
if(WIN32) if(WIN32)
get_filename_component(regpath "[HKEY_CURRENT_USER\\Software\\XIMEA\\CamSupport\\API;Path]" ABSOLUTE) 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() endif()
if(X86_64) if(X86_64)
set(lib_dir "x64") set(lib_dir "x64")