Skip to content

Commit 81078ca

Browse files
authored
Merge pull request swiftlang#21374 from compnerd/batteries-included
build: add Windows includes to build
2 parents f4c0b89 + 9624932 commit 81078ca

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

cmake/modules/AddSwift.cmake

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -307,6 +307,11 @@ function(_add_variant_c_compile_flags)
307307
list(APPEND result "\"${CMAKE_INCLUDE_FLAG_C}${path}\"")
308308
endforeach()
309309
list(APPEND result "-D__ANDROID_API__=${SWIFT_ANDROID_API_LEVEL}")
310+
elseif(CFLAGS_SDK STREQUAL WINDOWS)
311+
swift_windows_include_for_arch(${CFLAGS_ARCH} ${CFLAGS_ARCH}_INCLUDE)
312+
foreach(path ${${CFLAGS_ARCH}_INCLUDE})
313+
list(APPEND result "\"${CMAKE_INCLUDE_FLAG_C}${path}\"")
314+
endforeach()
310315
endif()
311316

312317
set("${CFLAGS_RESULT_VAR_NAME}" "${result}" PARENT_SCOPE)

0 commit comments

Comments
 (0)