# New To CMake and Looking For Guidance

**URL:** <https://discourse.cmake.org/t/new-to-cmake-and-looking-for-guidance/9378>\
**Category:** Code\
**Created:** [November 7, 2023, 8:18am UTC](https://discourse.cmake.org/t/new-to-cmake-and-looking-for-guidance/9378 "2023-11-07T08:18:03Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![apek75](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/a/f05b48/32.png) [@apek75](https://discourse.cmake.org/u/apek75)\
**Post date:** [November 7, 2023, 8:18am UTC](https://discourse.cmake.org/t/new-to-cmake-and-looking-for-guidance/9378/1 "2023-11-07T08:18:03Z")

</div>

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](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

---

<div class="post-metadata">

**Author:** ![snikulov](https://discourse.cmake.org/user_avatar/discourse.cmake.org/snikulov/32/194_2.png) [@snikulov](https://discourse.cmake.org/u/snikulov)\
**Post date:** [November 7, 2023, 9:26am UTC](https://discourse.cmake.org/t/new-to-cmake-and-looking-for-guidance/9378/2 "2023-11-07T09:26:21Z")

</div>

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).

---

<div class="post-metadata">

**Author:** ![scivision](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/s/a87d85/32.png) [@scivision](https://discourse.cmake.org/u/scivision)\
**Post date:** [November 7, 2023, 6:39pm UTC](https://discourse.cmake.org/t/new-to-cmake-and-looking-for-guidance/9378/3 "2023-11-07T18:39:00Z")

</div>

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

```auto
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)?
