File tree 4 files changed +33
-0
lines changed
4 files changed +33
-0
lines changed Original file line number Diff line number Diff line change @@ -128,6 +128,10 @@ if(CMAKE_SYSTEM_NAME STREQUAL "Linux" OR CMAKE_SYSTEM_NAME STREQUAL "Android")
128
128
list (APPEND _Foundation_common_build_flags
129
129
"-D_GNU_SOURCE"
130
130
"-I/usr/lib/swift" ) # dispatch
131
+ elseif (CMAKE_SYSTEM_NAME STREQUAL "Windows" )
132
+ list (APPEND _Foundation_common_build_flags
133
+ "-D_DLL"
134
+ "-D_WINDLL" )
131
135
endif ()
132
136
133
137
include (FoundationSwiftSupport)
Original file line number Diff line number Diff line change @@ -115,6 +115,16 @@ target_link_libraries(CoreFoundation
115
115
_FoundationICU
116
116
dispatch)
117
117
118
+ if (CMAKE_SYSTEM_NAME STREQUAL Windows)
119
+ target_link_libraries (CoreFoundation
120
+ PRIVATE
121
+ AdvAPI32
122
+ Secur32
123
+ User32
124
+ mincore
125
+ pathcch)
126
+ endif ()
127
+
118
128
set_property (GLOBAL APPEND PROPERTY Foundation_EXPORTS CoreFoundation)
119
129
120
130
# Copy Headers to known directory for direct client (XCTest) test builds
Original file line number Diff line number Diff line change @@ -30,6 +30,16 @@ target_link_libraries(_CFURLSessionInterface PRIVATE
30
30
dispatch
31
31
CURL::libcurl)
32
32
33
+
34
+ if (CMAKE_SYSTEM_NAME STREQUAL Windows)
35
+ target_link_libraries (_CFURLSessionInterface
36
+ PRIVATE
37
+ AdvAPI32
38
+ Secur32
39
+ User32
40
+ mincore)
41
+ endif ()
42
+
33
43
if (NOT BUILD_SHARED_LIBS )
34
44
set_property (GLOBAL APPEND PROPERTY Foundation_EXPORTS _CFURLSessionInterface)
35
45
install (TARGETS _CFURLSessionInterface
Original file line number Diff line number Diff line change @@ -29,6 +29,15 @@ target_link_libraries(_CFXMLInterface PRIVATE
29
29
dispatch
30
30
LibXml2::LibXml2)
31
31
32
+ if (CMAKE_SYSTEM_NAME STREQUAL Windows)
33
+ target_link_libraries (_CFXMLInterface
34
+ PRIVATE
35
+ AdvAPI32
36
+ Secur32
37
+ User32
38
+ mincore)
39
+ endif ()
40
+
32
41
if (NOT BUILD_SHARED_LIBS )
33
42
set_property (GLOBAL APPEND PROPERTY Foundation_EXPORTS _CFXMLInterface)
34
43
install (TARGETS _CFXMLInterface
You can’t perform that action at this time.
0 commit comments