From 340a390ea2a152aadf5866428e1457c51c2ec10b Mon Sep 17 00:00:00 2001 From: stepkamipt Date: Fri, 2 Aug 2024 10:07:36 +0200 Subject: [PATCH] Fix path to 3rdparty cmake. Current code using CMAKE_SOURCE_DIR and it works well if opencv is standalone CMake project, but in case of building OpenCV as part of a larger CMake project (e.g. one that includes opencv and opencv_contrib) this path is incorrect, unlike OpenCV_SOURCE_DIR --- modules/videoio/cmake/detect_obsensor.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/videoio/cmake/detect_obsensor.cmake b/modules/videoio/cmake/detect_obsensor.cmake index f0b66015eb..c7e6164c0f 100644 --- a/modules/videoio/cmake/detect_obsensor.cmake +++ b/modules/videoio/cmake/detect_obsensor.cmake @@ -1,7 +1,7 @@ # --- obsensor --- if(NOT HAVE_OBSENSOR) if(OBSENSOR_USE_ORBBEC_SDK) - include(${CMAKE_SOURCE_DIR}/3rdparty/orbbecsdk/orbbecsdk.cmake) + include("${OpenCV_SOURCE_DIR}/3rdparty/orbbecsdk/orbbecsdk.cmake") download_orbbec_sdk(ORBBEC_SDK_ROOT_DIR) message(STATUS "ORBBEC_SDK_ROOT_DIR: ${ORBBEC_SDK_ROOT_DIR}") if(ORBBEC_SDK_ROOT_DIR)