cmake: map RelWithDebInfo and MinSizeRel configuration to Release

pull/9808/head
Benoit Blanchon 7 years ago committed by Alexander Alekhin
parent b43e5e2d21
commit 7997e7aee9
  1. 8
      cmake/templates/OpenCVConfig.cmake.in

@ -219,6 +219,14 @@ foreach(__cvcomponent ${OpenCV_FIND_COMPONENTS})
string(TOUPPER "${__cvcomponent}" __cvcomponent) string(TOUPPER "${__cvcomponent}" __cvcomponent)
set(${__cvcomponent}_FOUND 1) set(${__cvcomponent}_FOUND 1)
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() endforeach()
set(OpenCV_FIND_COMPONENTS ${OpenCV_FIND_COMPONENTS_}) set(OpenCV_FIND_COMPONENTS ${OpenCV_FIND_COMPONENTS_})

Loading…
Cancel
Save