|
| 1 | + |
| 2 | +add_library(Foundation |
| 3 | + AffineTransform.swift |
| 4 | + Array.swift |
| 5 | + Boxing.swift |
| 6 | + Bridging.swift |
| 7 | + Bundle.swift |
| 8 | + ByteCountFormatter.swift |
| 9 | + Calendar.swift |
| 10 | + CGFloat.swift |
| 11 | + CharacterSet.swift |
| 12 | + Codable.swift |
| 13 | + Collections+DataProtocol.swift |
| 14 | + ContiguousBytes.swift |
| 15 | + Data.swift |
| 16 | + DataProtocol.swift |
| 17 | + Date.swift |
| 18 | + DateComponents.swift |
| 19 | + DateComponentsFormatter.swift |
| 20 | + DateFormatter.swift |
| 21 | + DateInterval.swift |
| 22 | + DateIntervalFormatter.swift |
| 23 | + Decimal.swift |
| 24 | + Dictionary.swift |
| 25 | + DispatchData+DataProtocol.swift |
| 26 | + EnergyFormatter.swift |
| 27 | + ExtraStringAPIs.swift |
| 28 | + FileHandle.swift |
| 29 | + FileManager.swift |
| 30 | + FileManager+POSIX.swift |
| 31 | + FileManager+Win32.swift |
| 32 | + FileManager_XDG.swift |
| 33 | + Formatter.swift |
| 34 | + FoundationErrors.swift |
| 35 | + Host.swift |
| 36 | + IndexPath.swift |
| 37 | + IndexSet.swift |
| 38 | + ISO8601DateFormatter.swift |
| 39 | + JSONEncoder.swift |
| 40 | + JSONSerialization.swift |
| 41 | + LengthFormatter.swift |
| 42 | + Locale.swift |
| 43 | + MassFormatter.swift |
| 44 | + Measurement.swift |
| 45 | + MeasurementFormatter.swift |
| 46 | + Notification.swift |
| 47 | + NotificationQueue.swift |
| 48 | + NSArray.swift |
| 49 | + NSAttributedString.swift |
| 50 | + NSCache.swift |
| 51 | + NSCalendar.swift |
| 52 | + NSCFArray.swift |
| 53 | + NSCFBoolean.swift |
| 54 | + NSCFCharacterSet.swift |
| 55 | + NSCFDictionary.swift |
| 56 | + NSCFSet.swift |
| 57 | + NSCFString.swift |
| 58 | + NSCharacterSet.swift |
| 59 | + NSCoder.swift |
| 60 | + NSComparisonPredicate.swift |
| 61 | + NSCompoundPredicate.swift |
| 62 | + NSConcreteValue.swift |
| 63 | + NSData+DataProtocol.swift |
| 64 | + NSData.swift |
| 65 | + NSDate.swift |
| 66 | + NSDecimalNumber.swift |
| 67 | + NSDictionary.swift |
| 68 | + NSEnumerator.swift |
| 69 | + NSError.swift |
| 70 | + NSExpression.swift |
| 71 | + NSGeometry.swift |
| 72 | + NSIndexPath.swift |
| 73 | + NSIndexSet.swift |
| 74 | + NSKeyedArchiver.swift |
| 75 | + NSKeyedArchiverHelpers.swift |
| 76 | + NSKeyedCoderOldStyleArray.swift |
| 77 | + NSKeyedUnarchiver.swift |
| 78 | + NSLocale.swift |
| 79 | + NSLock.swift |
| 80 | + NSLog.swift |
| 81 | + NSMeasurement.swift |
| 82 | + NSNotification.swift |
| 83 | + NSNull.swift |
| 84 | + NSNumber.swift |
| 85 | + NSObjCRuntime.swift |
| 86 | + NSObject.swift |
| 87 | + NSOrderedSet.swift |
| 88 | + NSPathUtilities.swift |
| 89 | + NSPersonNameComponents.swift |
| 90 | + NSPlatform.swift |
| 91 | + NSPredicate.swift |
| 92 | + NSRange.swift |
| 93 | + NSRegularExpression.swift |
| 94 | + NSSet.swift |
| 95 | + NSSortDescriptor.swift |
| 96 | + NSSpecialValue.swift |
| 97 | + NSString.swift |
| 98 | + NSStringAPI.swift |
| 99 | + NSSwiftRuntime.swift |
| 100 | + NSTextCheckingResult.swift |
| 101 | + NSTimeZone.swift |
| 102 | + NSURL.swift |
| 103 | + NSURLError.swift |
| 104 | + NSUUID.swift |
| 105 | + NSValue.swift |
| 106 | + NumberFormatter.swift |
| 107 | + Operation.swift |
| 108 | + PersonNameComponents.swift |
| 109 | + PersonNameComponentsFormatter.swift |
| 110 | + Pointers+DataProtocol.swift |
| 111 | + Port.swift |
| 112 | + PortMessage.swift |
| 113 | + Process.swift |
| 114 | + ProcessInfo.swift |
| 115 | + Progress.swift |
| 116 | + ProgressFraction.swift |
| 117 | + PropertyListEncoder.swift |
| 118 | + PropertyListSerialization.swift |
| 119 | + ReferenceConvertible.swift |
| 120 | + RunLoop.swift |
| 121 | + Scanner.swift |
| 122 | + ScannerAPI.swift |
| 123 | + Set.swift |
| 124 | + Stream.swift |
| 125 | + String.swift |
| 126 | + StringEncodings.swift |
| 127 | + Thread.swift |
| 128 | + Timer.swift |
| 129 | + TimeZone.swift |
| 130 | + Unit.swift |
| 131 | + URL.swift |
| 132 | + URLComponents.swift |
| 133 | + UserDefaults.swift |
| 134 | + UUID.swift) |
| 135 | +target_compile_definitions(Foundation PRIVATE |
| 136 | + DEPLOYMENT_RUNTIME_SWIFT) |
| 137 | +target_compile_options(Foundation PUBLIC |
| 138 | + "SHELL:-Xcc -F${CMAKE_BINARY_DIR}") |
| 139 | +target_compile_options(Foundation PRIVATE |
| 140 | + "SHELL:-Xcc -I${ICU_INCLUDE_DIR}") |
| 141 | +if(ENABLE_TESTING) |
| 142 | + target_compile_options(Foundation PRIVATE |
| 143 | + -enable-testing) |
| 144 | +endif() |
| 145 | +target_link_libraries(Foundation PRIVATE |
| 146 | + ${ICU_UC_LIBRARY} |
| 147 | + ${ICU_I18N_LIBRARY} |
| 148 | + CoreFoundation) |
| 149 | +target_link_libraries(Foundation PUBLIC |
| 150 | + swiftDispatch) |
| 151 | +if(CMAKE_SYSTEM_NAME STREQUAL Windows) |
| 152 | + target_link_libraries(Foundation PRIVATE |
| 153 | + CoreFoundationResources) |
| 154 | + target_link_libraries(Foundation PRIVATE |
| 155 | + Ole32 |
| 156 | + Shell32 |
| 157 | + pathcch) |
| 158 | +endif() |
| 159 | +set_target_properties(Foundation PROPERTIES |
| 160 | + Swift_MODULE_DIRECTORY ${CMAKE_BINARY_DIR}/swift |
| 161 | + INTERFACE_INCLUDE_DIRECTORIES ${CMAKE_BINARY_DIR}/swift) |
| 162 | + |
| 163 | + |
| 164 | +add_library(FoundationNetworking |
| 165 | + Boxing.swift |
| 166 | + NSURLRequest.swift |
| 167 | + HTTPCookie.swift |
| 168 | + HTTPCookieStorage.swift |
| 169 | + URLAuthenticationChallenge.swift |
| 170 | + URLCache.swift |
| 171 | + URLCredential.swift |
| 172 | + URLCredentialStorage.swift |
| 173 | + URLProtectionSpace.swift |
| 174 | + URLProtocol.swift |
| 175 | + URLRequest.swift |
| 176 | + URLResponse.swift |
| 177 | + URLSession/BodySource.swift |
| 178 | + URLSession/Configuration.swift |
| 179 | + URLSession/http/HTTPMessage.swift |
| 180 | + URLSession/http/HTTPURLProtocol.swift |
| 181 | + URLSession/libcurl/EasyHandle.swift |
| 182 | + URLSession/libcurl/libcurlHelpers.swift |
| 183 | + URLSession/libcurl/MultiHandle.swift |
| 184 | + URLSession/Message.swift |
| 185 | + URLSession/NativeProtocol.swift |
| 186 | + URLSession/NetworkingSpecific.swift |
| 187 | + URLSession/ftp/FTPURLProtocol.swift |
| 188 | + URLSession/TaskRegistry.swift |
| 189 | + URLSession/TransferState.swift |
| 190 | + URLSession/URLSession.swift |
| 191 | + URLSession/URLSessionConfiguration.swift |
| 192 | + URLSession/URLSessionDelegate.swift |
| 193 | + URLSession/URLSessionTask.swift) |
| 194 | +target_compile_definitions(FoundationNetworking PRIVATE |
| 195 | + DEPLOYMENT_RUNTIME_SWIFT |
| 196 | + NS_BUILDING_FOUNDATION_NETWORKING) |
| 197 | +target_compile_options(FoundationNetworking PUBLIC |
| 198 | + "SHELL:-Xcc -F${CMAKE_BINARY_DIR}") |
| 199 | +if(ENABLE_TESTING) |
| 200 | + target_compile_options(FoundationNetworking PRIVATE |
| 201 | + -enable-testing) |
| 202 | +endif() |
| 203 | +target_link_libraries(FoundationNetworking PRIVATE |
| 204 | + ${CURL_LIBRARIES} |
| 205 | + ${ZLIB_LIBRARIES} |
| 206 | + Foundation |
| 207 | + CFURLSessionInterface) |
| 208 | +set_target_properties(FoundationNetworking PROPERTIES |
| 209 | + Swift_MODULE_DIRECTORY ${CMAKE_BINARY_DIR}/swift |
| 210 | + INTERFACE_INCLUDE_DIRECTORIES ${CMAKE_BINARY_DIR}/swift) |
| 211 | + |
| 212 | + |
| 213 | +add_library(FoundationXML |
| 214 | + XMLDocument.swift |
| 215 | + XMLDTD.swift |
| 216 | + XMLDTDNode.swift |
| 217 | + XMLElement.swift |
| 218 | + XMLNode.swift |
| 219 | + XMLParser.swift) |
| 220 | +target_compile_definitions(FoundationXML PRIVATE |
| 221 | + DEPLOYMENT_RUNTIME_SWIFT) |
| 222 | +target_compile_options(FoundationXML PUBLIC |
| 223 | + "SHELL:-Xcc -F${CMAKE_BINARY_DIR}") |
| 224 | +if(ENABLE_TESTING) |
| 225 | + target_compile_options(FoundationXML PRIVATE |
| 226 | + -enable-testing) |
| 227 | +endif() |
| 228 | +target_link_libraries(FoundationXML PRIVATE |
| 229 | + ${LIBXML2_LIBRARIES} |
| 230 | + Foundation |
| 231 | + CFXMLInterface) |
| 232 | +set_target_properties(FoundationXML PROPERTIES |
| 233 | + Swift_MODULE_DIRECTORY ${CMAKE_BINARY_DIR}/swift |
| 234 | + INTERFACE_INCLUDE_DIRECTORIES ${CMAKE_BINARY_DIR}/swift) |
| 235 | + |
| 236 | +get_swift_host_arch(swift_arch) |
| 237 | +install(TARGETS Foundation FoundationNetworking FoundationXML |
| 238 | + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} |
| 239 | + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} |
| 240 | + RUNTIME DESTINATION bin) |
| 241 | +install(FILES |
| 242 | + ${CMAKE_BINARY_DIR}/swift/Foundation.swiftdoc |
| 243 | + ${CMAKE_BINARY_DIR}/swift/Foundation.swiftmodule |
| 244 | + ${CMAKE_BINARY_DIR}/swift/FoundationNetworking.swiftdoc |
| 245 | + ${CMAKE_BINARY_DIR}/swift/FoundationNetworking.swiftmodule |
| 246 | + ${CMAKE_BINARY_DIR}/swift/FoundationXML.swiftdoc |
| 247 | + ${CMAKE_BINARY_DIR}/swift/FoundationXML.swiftmodule |
| 248 | + DESTINATION ${CMAKE_INSTALL_LIBDIR}/swift$<$<NOT:$<BOOL:${BUILD_SHARED_LIBS}>>:_static>/$<LOWER_CASE:${CMAKE_SYSTEM_NAME}>/${swift_arch}) |
0 commit comments