diff --git a/MyxCMake/modules/MyxCMakeCommonTargetProperties.cmake b/MyxCMake/modules/MyxCMakeCommonTargetProperties.cmake index 70210fb..631b98d 100644 --- a/MyxCMake/modules/MyxCMakeCommonTargetProperties.cmake +++ b/MyxCMake/modules/MyxCMakeCommonTargetProperties.cmake @@ -1,4 +1,8 @@ function(myx_cmake_common_target_properties target) + if(NOT TARGET ${target}) + message(FATAL_ERROR "MyxCMake: Target ${target} does not exists.") + return() + endif() get_target_property(_target_type ${target} TYPE) set(__visibility PUBLIC)