Hey, I want to use OpenCV that does not out of the box allow for a debug build, and I was hoping if there was somehow a way of forcing a --config debug build to use the Release version of this library?
If CMake is set to --debug it is seemingly looking for not only the lib/Debug folder, and I thought I had perhaps found a way to make it look into the right folder:
cmake_minimum_required(VERSION 3.1.0)
project(VehicleComputerVision VERSION 0.1.0)
set(LIB_OpenCV_LIBRARIES
"$<$<NOT:$<CONFIG:DEBUG>>:${LIB_OpenCV_RELEASE}>"
"$<$<CONFIG:DEBUG>:${LIB_OpenCV_RELEASE}>"
)
add_executable(VehicleComputerVision
VehicleComputerVision.cpp
)
target_link_libraries(VehicleComputerVision
PRIVATE
opencv_core
opencv_highgui
opencv_imgproc
)
But I still get a
fatal error LNK1104: cannot open file ...\build\opencv-4.5.5\lib\Debug\opencv_highgui455d.lib'
I assume the d suffix to denote the debug version of the library, though I don’t know where it is specified to look for this
Is there a way to tell CMake to essentially treat this package as a release version despite the --config debug flag?