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)
10431043 add_custom_target ("${target} "
10441044 DEPENDS
10451045 "${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 ()
10471049
10481050 return ()
10491051 endif ()
@@ -1077,7 +1079,9 @@ function(add_swift_target_library_single target name)
10771079 if (SWIFTLIB_SINGLE_ONLY_SWIFTMODULE)
10781080 add_custom_target ("${target} "
10791081 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 ()
10811085 return ()
10821086 endif ()
10831087
@@ -1086,7 +1090,7 @@ function(add_swift_target_library_single target name)
10861090 ${SWIFTLIB_SINGLE_EXTERNAL_SOURCES}
10871091 ${INCORPORATED_OBJECT_LIBRARIES_EXPRESSIONS}
10881092 ${SWIFTLIB_SINGLE_XCODE_WORKAROUND_SOURCES} )
1089- if (NOT SWIFTLIB_SINGLE_OBJECT_LIBRARY)
1093+ if (NOT SWIFTLIB_SINGLE_OBJECT_LIBRARY AND TARGET " ${install_in_component} " )
10901094 add_dependencies ("${install_in_component} " "${target} " )
10911095 endif ()
10921096 # NOTE: always inject the LLVMSupport directory before anything else. We want
You can’t perform that action at this time.
0 commit comments