Skip to content

Commit d3ce6a6

Browse files
committed
build: fix a mixup with the cmake variables
This adjusts the windows build for cross-compiling to use the correct variable. Import libraries will be generated and tracked properly if the CMAKE_SYSTEM_NAME is set to Windows. It does not matter what the build system is.
1 parent 9c8d449 commit d3ce6a6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cmake/modules/AddSwift.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1312,7 +1312,7 @@ function(_add_swift_library_single target name)
13121312
# doing so will result in incorrect symbol resolution and linkage. We created
13131313
# import library targets when the library was added. Use that to adjust the
13141314
# link libraries.
1315-
if(SWIFTLIB_SINGLE_SDK STREQUAL WINDOWS AND NOT CMAKE_HOST_SYSTEM_NAME STREQUAL Windows)
1315+
if(SWIFTLIB_SINGLE_SDK STREQUAL WINDOWS AND NOT CMAKE_SYSTEM_NAME STREQUAL Windows)
13161316
foreach(library_list LINK_LIBRARIES INTERFACE_LINK_LIBRARIES PRIVATE_LINK_LIBRARIES)
13171317
set(import_libraries)
13181318
foreach(library ${SWIFTLIB_SINGLE_${library_list}})

0 commit comments

Comments
 (0)