Skip to content

Commit 4f102c6

Browse files
Merge pull request #13180 from compnerd/old-build
build: use older means of getting the swiftrt object
2 parents 8f8f000 + bb762f6 commit 4f102c6

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

cmake/modules/AddSwift.cmake

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -821,7 +821,15 @@ function(_add_swift_library_single target name)
821821
${SWIFTLIB_SINGLE_XCODE_WORKAROUND_SOURCES})
822822
if("${SWIFT_SDK_${SWIFTLIB_SINGLE_SDK}_OBJECT_FORMAT}" STREQUAL "ELF" AND SWIFTLIB_TARGET_LIBRARY)
823823
if("${libkind}" STREQUAL "SHARED")
824-
target_sources(${target} PRIVATE $<TARGET_OBJECTS:swiftImageRegistrationObject-${SWIFT_SDK_${sdk}_LIB_SUBDIR}-${SWIFTLIB_SINGLE_ARCHITECTURE}>)
824+
# TODO(compnerd) switch to the generator expression when cmake is upgraded
825+
# to a version which supports it.
826+
# target_sources(${target} PRIVATE $<TARGET_OBJECTS:swiftImageRegistrationObject-${SWIFT_SDK_${sdk}_LIB_SUBDIR}-${SWIFTLIB_SINGLE_ARCHITECTURE}>)
827+
target_sources(${target}
828+
PRIVATE
829+
"${SWIFTLIB_DIR}/${SWIFTLIB_SINGLE_SUBDIR}/swiftrt${CMAKE_C_OUTPUT_EXTENSION}")
830+
set_source_files_properties("${SWIFTLIB_DIR}/${SWIFTLIB_SINGLE_SUBDIR}/swiftrt${CMAKE_C_OUTPUT_EXTENSION}"
831+
PROPERTIES
832+
GENERATED 1)
825833
endif()
826834
endif()
827835
_set_target_prefix_and_suffix("${target}" "${libkind}" "${SWIFTLIB_SINGLE_SDK}")

0 commit comments

Comments
 (0)