@@ -42,6 +42,12 @@ instructions for your specific platform.
42
42
Android builds on Windows.
43
43
* ** Cocoapods** : Required for building iOS or tvOS libraries.
44
44
45
+ To build for Desktop, you can install prerequisites by running the following
46
+ script in the root of the repository: ` scripts/gha/install_prereqs_desktop.py `
47
+
48
+ To build for Android, you can install prerequisites by running the following
49
+ script in the root of the repository: ` build_scripts/android/install_prereqs.sh `
50
+
45
51
## Building the SDK
46
52
47
53
The SDK uses CMake for C++ compilation and Gradle for Android-specific parts.
@@ -50,15 +56,16 @@ The SDK uses CMake for C++ compilation and Gradle for Android-specific parts.
50
56
51
57
1 . Create a build directory (e.g., ` mkdir desktop_build && cd desktop_build ` ).
52
58
2 . Run CMake to configure: ` cmake .. `
53
- * For iOS:
54
- ` cmake -DCMAKE_TOOLCHAIN_FILE=../cmake/toolchains/ios.cmake .. `
55
- Note: iOS setup typically requires both including Firebase pods (via
56
- ` Podfile ` ) and linking the ` .framework ` files from the C++ SDK
57
- distribution.
58
- * For tvOS:
59
- ` cmake -DCMAKE_TOOLCHAIN_FILE=../cmake/toolchains/apple.toolchain.cmake -DPLATFORM=TVOS .. `
59
+ * For Desktop: Run as is. You can use BORINGSSL instead of OpenSSL (for fewer
60
+ system dependencies with the ` -DFIREBASE_USE_BORINGSSL=YES ` parameter.
61
+ * For iOS, include the ` -DCMAKE_TOOLCHAIN_FILE=../cmake/toolchains/ios.cmake `
62
+ parameter. This requires running on a Mac build machine.
60
63
3 . Build specific targets: ` cmake --build . --target firebase_analytics `
61
64
(replace ` firebase_analytics ` with the desired library).
65
+ Or omit the entire ` --target ` parameter to build all targets.
66
+
67
+ You can also use the ` scripts/gha/build_desktop.py ` script to build the full
68
+ desktop SDK.
62
69
63
70
Refer to ` README.md ` for details on CMake generators and providing custom
64
71
third-party dependency locations.
@@ -76,6 +83,9 @@ This command should be run from the root of the repository. Proguard files are
76
83
generated in each library's build directory (e.g.,
77
84
` analytics/build/analytics.pro ` ).
78
85
86
+ You can build the entire SDK for Android by running ` ./gradlew build ` or
87
+ ` build_scripts/android/build.sh ` .
88
+
79
89
### Desktop Platform Setup Details
80
90
81
91
When setting up for desktop, if you are using an iOS
0 commit comments