Skip to content

Commit 7997e7a

Browse files
bblanchonalalek
authored andcommitted
cmake: map RelWithDebInfo and MinSizeRel configuration to Release
1 parent b43e5e2 commit 7997e7a

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

cmake/templates/OpenCVConfig.cmake.in

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -219,6 +219,14 @@ foreach(__cvcomponent ${OpenCV_FIND_COMPONENTS})
219219
string(TOUPPER "${__cvcomponent}" __cvcomponent)
220220
set(${__cvcomponent}_FOUND 1)
221221
endif()
222+
# OpenCV supports Debug and Release only.
223+
# RelWithDebInfo and MinSizeRel are mapped to Release
224+
if(TARGET ${__cvcomponent})
225+
set_target_properties(${__cvcomponent} PROPERTIES
226+
MAP_IMPORTED_CONFIG_MINSIZEREL "Release"
227+
MAP_IMPORTED_CONFIG_RELWITHDEBINFO "Release"
228+
)
229+
endif()
222230
endforeach()
223231
set(OpenCV_FIND_COMPONENTS ${OpenCV_FIND_COMPONENTS_})
224232

0 commit comments

Comments
 (0)