Allow aliased targets for apiValidator check (#6508)

This commit is contained in:
Ilya Lavrenov
2021-07-05 09:48:05 +03:00
committed by GitHub
parent d4c2b27100
commit 50c73e6914
22 changed files with 118 additions and 117 deletions

View File

@@ -88,9 +88,12 @@ function(_ie_add_api_validator_post_build_step)
macro(api_validator_get_target_name)
get_target_property(IS_IMPORTED ${target} IMPORTED)
get_target_property(orig_target ${target} ALIASED_TARGET)
if(IS_IMPORTED)
get_target_property(target_location ${target} LOCATION)
get_filename_component(target_name "${target_location}" NAME_WE)
elseif(TARGET "${orig_target}")
set(target_name ${orig_target})
else()
set(target_name ${target})
endif()