Fix the detection of the XIMEA library (since its location may be different when the version of the ximea software is updated)

This commit is contained in:
Philippe FOUBERT 2020-06-18 11:09:08 +02:00
parent e3d502310f
commit 0eb7060205

View File

@ -6,10 +6,10 @@ if(NOT HAVE_XIMEA)
endif() endif()
endif() endif()
if(X86_64) if(X86_64)
set(lib_dir "x64") set(lib_dir "API/x64" "API/64bit")
set(lib_suffix "64") set(lib_suffix "64")
else() else()
set(lib_dir "x86") set(lib_dir "API/x86" "API/32bit")
set(lib_suffix "32") set(lib_suffix "32")
endif() endif()
find_path(XIMEA_INCLUDE "xiApi.h" find_path(XIMEA_INCLUDE "xiApi.h"
@ -19,7 +19,7 @@ if(NOT HAVE_XIMEA)
find_library(XIMEA_LIBRARY m3api xiapi${lib_suffix} find_library(XIMEA_LIBRARY m3api xiapi${lib_suffix}
PATHS "${XIMEA_ROOT}" ENV XIMEA_ROOT "/opt/XIMEA" PATHS "${XIMEA_ROOT}" ENV XIMEA_ROOT "/opt/XIMEA"
HINTS "${regpath}" HINTS "${regpath}"
PATH_SUFFIXES "API/${lib_dir}") PATH_SUFFIXES ${lib_dir})
if(XIMEA_INCLUDE AND XIMEA_LIBRARY) if(XIMEA_INCLUDE AND XIMEA_LIBRARY)
set(HAVE_XIMEA TRUE) set(HAVE_XIMEA TRUE)
endif() endif()