File tree Expand file tree Collapse file tree 4 files changed +45
-0
lines changed Expand file tree Collapse file tree 4 files changed +45
-0
lines changed Original file line number Diff line number Diff line change @@ -14,6 +14,7 @@ target_compile_definitions(swiftCRT PRIVATE
14
14
target_compile_options (swiftCRT PRIVATE
15
15
"SHELL:-Xcc -D_USE_MATH_DEFINES" )
16
16
target_link_libraries (swiftCRT PRIVATE
17
+ ClangModules
17
18
swiftCore )
18
19
19
20
install (TARGETS swiftCRT
Original file line number Diff line number Diff line change @@ -6,6 +6,7 @@ set_target_properties(swiftWinSDK PROPERTIES
6
6
target_compile_definitions (swiftCRT PRIVATE
7
7
$< $< BOOL:${SwiftOverlay_ENABLE_REFLECTION} > :SWIFT_ENABLE_REFLECTION> )
8
8
target_link_libraries (swiftWinSDK PRIVATE
9
+ ClangModules
9
10
swiftCore )
10
11
11
12
install (TARGETS swiftWinSDK
Original file line number Diff line number Diff line change 1
1
2
+ file (TO_CMAKE_PATH "$ENV{WindowsSdkDir} " WindowsSdkDir )
3
+ file (TO_CMAKE_PATH "$ENV{WindowsSDKVersion} " WindowsSDKVersion )
4
+ file (TO_CMAKE_PATH "$ENV{UniversalCRTSdkDir} " UniversalCRTSdkDir )
5
+ file (TO_CMAKE_PATH "$ENV{UCRTVersion} " UCRTVersion )
6
+ file (TO_CMAKE_PATH "$ENV{VCToolsInstallDir} " VCToolsInstallDir )
7
+
8
+ file (CONFIGURE
9
+ OUTPUT windows-sdk-overlay.yaml
10
+ CONTENT [[
11
+ ---
12
+ version: 0
13
+ case-sensitive: false
14
+ use-external-names: false
15
+ roots:
16
+ - name: "@WindowsSdkDir@/Include/@WindowsSDKVersion@/um"
17
+ type: directory
18
+ contents:
19
+ - name: module.modulemap
20
+ type: file
21
+ external-contents: "@CMAKE_CURRENT_SOURCE_DIR@/winsdk.modulemap"
22
+ - name: "@UniversalCRTSdkDir@/Include/@UCRTVersion@/ucrt"
23
+ type: directory
24
+ contents:
25
+ - name: module.modulemap
26
+ type: file
27
+ external-contents: "@CMAKE_CURRENT_SOURCE_DIR@/ucrt.modulemap"
28
+ - name: "@VCToolsInstallDir@include"
29
+ type: directory
30
+ contents:
31
+ - name: module.modulemap
32
+ type: file
33
+ external-contents: "@CMAKE_CURRENT_SOURCE_DIR@/vcruntime.modulemap"
34
+ - name: vcruntime.apinotes
35
+ type: file
36
+ external-contents: "@CMAKE_CURRENT_SOURCE_DIR@/vcruntime.apinotes"
37
+ ]]
38
+ ESCAPE_QUOTES @ONLY NEWLINE_STYLE LF )
39
+
40
+ add_library (ClangModules INTERFACE )
41
+ target_compile_options (ClangModules INTERFACE
42
+ "$<$<COMPILE_LANGUAGE:Swift>:SHELL:-vfsoverlay ${CMAKE_CURRENT_BINARY_DIR} /windows-sdk-overlay.yaml>" )
43
+
2
44
install (FILES
3
45
ucrt.modulemap
4
46
vcruntime.apinotes
Original file line number Diff line number Diff line change @@ -9,6 +9,7 @@ set_target_properties(swift_Builtin_float PROPERTIES
9
9
target_compile_options (swift_Builtin_float PRIVATE
10
10
"$<$<PLATFORM_ID:Darwin>:SHELL:-Xfrontend -module-abi-name -Xfrontend Darwin>" )
11
11
target_link_libraries (swift_Builtin_float PRIVATE
12
+ $< $< PLATFORM_ID:Windows> :ClangModules>
12
13
swiftCore )
13
14
14
15
install (TARGETS swift_Builtin_float
You can’t perform that action at this time.
0 commit comments