Skip to content

Commit d721637

Browse files
committed
Functions: make FirebaseFunctions build for Android
Remove some linkage on Android as the libraries are not present. It is unclear if this is underlinking, but for now, this allows us to make progress. Explicitly cast the error value as it is a `DWORD` on Windows and `CInt` on Unix.
1 parent 9415d46 commit d721637

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

CMakeLists.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -209,11 +209,11 @@ target_link_libraries(FirebaseFunctions PUBLIC
209209
firebase_functions
210210
FirebaseCore)
211211
target_link_libraries(FirebaseFunctions PRIVATE
212-
crypto
213-
firebase_rest_lib
214212
flatbuffers
215-
ssl
213+
$<$<PLATFORM_ID:Windows>:crypto>
214+
$<$<PLATFORM_ID:Windows>:firebase_rest_lib>
216215
$<$<PLATFORM_ID:Windows>:libcurl>
216+
$<$<PLATFORM_ID:Windows>:ssl>
217217
$<$<PLATFORM_ID:Windows>:zlibstatic>)
218218

219219
add_library(FirebaseStorage SHARED

Sources/FirebaseFunctions/FunctionsErrorCode.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ extension FunctionsErrorCode: RawRepresentable {
3030

3131
extension FunctionsErrorCode {
3232
init(_ error: firebase.functions.Error, errorMessage: String?) {
33-
self.init((code: error.rawValue, message: errorMessage ?? "\(error.rawValue)"))
33+
self.init((code: numericCast(error.rawValue), message: errorMessage ?? "\(error.rawValue)"))
3434
}
3535

3636
init?(_ error: firebase.functions.Error?, errorMessage: UnsafePointer<CChar>?) {

0 commit comments

Comments
 (0)