New To CMake and Looking For Guidance

Dear CMake,

I am looking for your assistance in helping troubleshoot the below and am a CMake newby given the compassionate leave of my CTO. I have verified that the OpenCV module folder path is indeed current. Please can you advise what further log files and or exhaustive steps I can take to enable a successful build.

Selecting Windows SDK version 10.0.19041.0 to target Windows 10.0.22621.

Detected processor: AMD64

CMake Warning (dev) at cmake/OpenCVUtils.cmake:144 (find_package):
Policy CMP0148 is not set: The FindPythonInterp and FindPythonLibs module
are removed. Run “cmake --help-policy CMP0148” for policy details. Use
the cmake_policy command to set the policy and suppress this warning.

Call Stack (most recent call first):
cmake/OpenCVDetectPython.cmake:64 (find_host_package)
cmake/OpenCVDetectPython.cmake:271 (find_python)
CMakeLists.txt:611 (include)
This warning is for project developers. Use -Wno-dev to suppress it.

libjpeg-turbo: VERSION = 2.0.6, BUILD = opencv-4.5.1-libjpeg-turbo

Could NOT find OpenJPEG (minimal suitable version: 2.0, recommended version >= 2.3.1). OpenJPEG will be built from sources

OpenJPEG: VERSION = 2.3.1, BUILD = opencv-4.5.1-openjp2-2.3.1

OpenJPEG libraries will be built from sources: libopenjp2 (version “2.3.1”)

found Intel IPP (ICV version): 2020.0.0 [2020.0.0 Gold]

at: C:/opencv/build/3rdparty/ippicv/ippicv_win/icv

found Intel IPP Integration Wrappers sources: 2020.0.0

at: C:/opencv/build/3rdparty/ippicv/ippicv_win/iw

CMake Warning (dev) at cmake/OpenCVUtils.cmake:144 (find_package):
Policy CMP0146 is not set: The FindCUDA module is removed. Run “cmake
–help-policy CMP0146” for policy details. Use the cmake_policy command to
set the policy and suppress this warning.

Call Stack (most recent call first):
cmake/OpenCVDetectCUDA.cmake:17 (find_host_package)
cmake/OpenCVFindLibsPerf.cmake:43 (include)
CMakeLists.txt:700 (include)
This warning is for project developers. Use -Wno-dev to suppress it.

CUDA detected: 11.1

CUDA: Using CUDA_ARCH_BIN=8.6

CUDA NVCC target flags: -gencode;arch=compute_86,code=sm_86;-D_FORCE_INLINES

CUDA: MSVS generator is detected. Disabling CMake re-run checks (CMAKE_SUPPRESS_REGENERATION=ON). You need to run CMake manually if updates are required.

Could not find OpenBLAS include. Turning OpenBLAS_FOUND off

Could not find OpenBLAS lib. Turning OpenBLAS_FOUND off

Could NOT find BLAS (missing: BLAS_LIBRARIES)

Could NOT find LAPACK (missing: LAPACK_LIBRARIES)

Reason given by package: LAPACK could not be found because dependency BLAS could not be found.

Could NOT find JNI (missing: JAVA_INCLUDE_PATH JAVA_INCLUDE_PATH2 AWT JVM)

VTK is not found. Please set -DVTK_DIR in CMake to VTK build directory, or to VTK install subdirectory with VTKConfig.cmake file

CMake Error at cmake/OpenCVModule.cmake:274 (message):
No modules has been found: C:/opencv/opencv_contrib-4.5.1-master
Call Stack (most recent call first):
cmake/OpenCVModule.cmake:356 (_glob_locations)
modules/CMakeLists.txt:7 (ocv_glob_modules)

CMake Error at cmake/OpenCVModule.cmake:274 (message):
No modules has been found: C:/opencv/opencv-4.5.1/modules/
C:/opencv/opencv-4.5.1/modules
Call Stack (most recent call first):
cmake/OpenCVModule.cmake:356 (_glob_locations)
modules/CMakeLists.txt:7 (ocv_glob_modules)

OpenCV Python: during development append to PYTHONPATH: C:/opencv/build/python_loader

Processing WORLD modules…

module opencv_core…

CMake Error at modules/core/CMakeLists.txt:40 (message):
CUDA: OpenCV requires enabled ‘cudev’ module from ‘opencv_contrib’
repository: https://github.com/opencv/opencv_contrib
Call Stack (most recent call first):
modules/world/CMakeLists.txt:13 (include)
modules/world/CMakeLists.txt:32 (include_one_module)

Configuring incomplete, errors occurred!

Kind regards,

Andrew Kemp

It seems to me the issue not with module, but with found CUDA development library.
From the log provided I guess, it uses msys makefile but the rest of the project generated for visual studio.
Perhaps you’ve missed some how-to/guideline from you CTO.
Try to disable CUDA (not sure it’s good idea, but probably it confirms my assumption).

Your package uses several libraries. They may be installed in distinct directories and CMake needs to be told where to find them.

This command line would have several parameters and if the prior user of your package could provide an example that would be helpful.

The sequence of CMake commands would be like

cmake -Bbuild -DLAPACK_ROOT=/path/to/lapack -DVTK_ROOT=/path/to/vtk
# and so on

cmake --build build

Is your project a public project by chance (e.g. on GitHub)?