File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -1043,7 +1043,9 @@ function(add_swift_target_library_single target name)
1043
1043
add_custom_target ("${target} "
1044
1044
DEPENDS
1045
1045
"${swift_module_dependency_target} " )
1046
- add_dependencies ("${install_in_component} " "${target} " )
1046
+ if (TARGET "${install_in_component} " )
1047
+ add_dependencies ("${install_in_component} " "${target} " )
1048
+ endif ()
1047
1049
1048
1050
return ()
1049
1051
endif ()
@@ -1077,7 +1079,9 @@ function(add_swift_target_library_single target name)
1077
1079
if (SWIFTLIB_SINGLE_ONLY_SWIFTMODULE )
1078
1080
add_custom_target ("${target} "
1079
1081
DEPENDS "${swift_module_dependency_target} " )
1080
- add_dependencies ("${install_in_component} " "${target} " )
1082
+ if (TARGET "${install_in_component} " )
1083
+ add_dependencies ("${install_in_component} " "${target} " )
1084
+ endif ()
1081
1085
return ()
1082
1086
endif ()
1083
1087
@@ -1086,7 +1090,7 @@ function(add_swift_target_library_single target name)
1086
1090
${SWIFTLIB_SINGLE_EXTERNAL_SOURCES}
1087
1091
${INCORPORATED_OBJECT_LIBRARIES_EXPRESSIONS}
1088
1092
${SWIFTLIB_SINGLE_XCODE_WORKAROUND_SOURCES} )
1089
- if (NOT SWIFTLIB_SINGLE_OBJECT_LIBRARY )
1093
+ if (NOT SWIFTLIB_SINGLE_OBJECT_LIBRARY AND TARGET " ${install_in_component} " )
1090
1094
add_dependencies ("${install_in_component} " "${target} " )
1091
1095
endif ()
1092
1096
# NOTE: always inject the LLVMSupport directory before anything else. We want
You can’t perform that action at this time.
0 commit comments