I have a project which links to half a dozen libraries, among them OpenCV. Since Release variant is crashing, while Debug is working fine (just a lot slower), I wanted to co
Solution: add to CMakeLists.txt, after the call to FIND_PACKAGE(OpenCV):
FIND_PACKAGE(OpenCV)
set_target_properties(${OpenCV_LIBS} PROPERTIES MAP_IMPORTED_CONFIG_RELWITHDEBINFO RELEASE)