Skip to content

OpenVINO™ is an open source toolkit for optimizing and deploying AI inference

CMAKE: try to fix Windows debug (#28364)

Ilya Lavrenovd9d4c35ef869
diff --git a/cmake/templates/OpenVINOConfig.cmake.in b/cmake/templates/OpenVINOConfig.cmake.in
index 46550e36aac..209d38106c2 100644
--- a/cmake/templates/OpenVINOConfig.cmake.in
+++ b/cmake/templates/OpenVINOConfig.cmake.in
@@ -549,8 +549,13 @@ if(_ov_as_external_package)
foreach(target IN LISTS _ov_imported_libs)
if(TARGET ${target})
get_target_property(imported_configs ${target} IMPORTED_CONFIGURATIONS)
- if(NOT RELWITHDEBINFO IN_LIST imported_configs)
- set_property(TARGET ${target} PROPERTY MAP_IMPORTED_CONFIG_RELWITHDEBINFO RELEASE)
+ if(RELEASE IN_LIST imported_configs)
+ if(NOT RELWITHDEBINFO IN_LIST imported_configs)
+ set_property(TARGET ${target} PROPERTY MAP_IMPORTED_CONFIG_RELWITHDEBINFO RELEASE)
+ endif()
+ if(NOT MINSIZEREL IN_LIST imported_configs)
+ set_property(TARGET ${target} PROPERTY MAP_IMPORTED_CONFIG_MINSIZEREL RELEASE)
+ endif()
endif()
unset(imported_configs)
endif()