From 2d0611bc01b7c51bff8567c332077bc5c3f64c10 Mon Sep 17 00:00:00 2001 From: Benoit Blanchon Date: Mon, 18 Sep 2017 17:47:49 +0200 Subject: [PATCH] cmake: map RelWithDebInfo and MinSizeRel configuration to Release --- cmake/templates/OpenCVConfig.cmake.in | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/cmake/templates/OpenCVConfig.cmake.in b/cmake/templates/OpenCVConfig.cmake.in index c0a5838..0ac8a98 100644 --- a/cmake/templates/OpenCVConfig.cmake.in +++ b/cmake/templates/OpenCVConfig.cmake.in @@ -199,6 +199,14 @@ foreach(__cvcomponent ${OpenCV_FIND_COMPONENTS}) ) endif() endif() + # OpenCV supports Debug and Release only. + # RelWithDebInfo and MinSizeRel are mapped to Release + if(TARGET ${__cvcomponent}) + set_target_properties(${__cvcomponent} PROPERTIES + MAP_IMPORTED_CONFIG_MINSIZEREL "Release" + MAP_IMPORTED_CONFIG_RELWITHDEBINFO "Release" + ) + endif() endforeach() # ============================================================== -- 2.7.4