From c11eaeec497f877c4325c6fd89d998757c183fef Mon Sep 17 00:00:00 2001 From: Sonny Kurniawan Date: Thu, 15 Mar 2018 18:39:07 +0900 Subject: [PATCH] Help Cmake find OpenNI2 include path When compiling with OpenNI2 flag active, CMake will not be able to find OpenNI.h due to the environment path not set in OpenCVFindOpenNI2.cmake. This PR rectifies this issue. --- cmake/OpenCVFindOpenNI2.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/OpenCVFindOpenNI2.cmake b/cmake/OpenCVFindOpenNI2.cmake index 08e55e6a2b..8f1b54750d 100644 --- a/cmake/OpenCVFindOpenNI2.cmake +++ b/cmake/OpenCVFindOpenNI2.cmake @@ -14,7 +14,7 @@ endif() if(WIN32) if(NOT (MSVC64 OR MINGW64)) - find_file(OPENNI2_INCLUDES "OpenNI.h" PATHS "$ENV{OPEN_NI_INSTALL_PATH}Include" DOC "OpenNI2 c++ interface header") + find_file(OPENNI2_INCLUDES "OpenNI.h" PATHS $ENV{OPENNI2_INCLUDE} "$ENV{OPEN_NI_INSTALL_PATH}Include" DOC "OpenNI2 c++ interface header") find_library(OPENNI2_LIBRARY "OpenNI2" PATHS $ENV{OPENNI2_LIB} DOC "OpenNI2 library") else() find_file(OPENNI2_INCLUDES "OpenNI.h" PATHS $ENV{OPENNI2_INCLUDE64} "$ENV{OPEN_NI_INSTALL_PATH64}Include" DOC "OpenNI2 c++ interface header")