@@ -33,15 +33,23 @@ instructions for your specific platform.
33
33
* ** CMake** : Version 3.7 or newer.
34
34
* ** Python** : Version 3.7 or newer.
35
35
* ** Abseil-py** : Python package.
36
- * ** OpenSSL** : Required for Realtime Database and Cloud Firestore (especially
37
- for desktop builds).
36
+ * ** OpenSSL** : Required for desktop builds, unless you build with the
37
+ ` -DFIREBASE_USE_BORINGSSL=YES ` cmake flag.
38
+ * ** libsecret-1-dev** : (Linux Desktop) Required for secure credential storage.
39
+ Install using ` sudo apt-get install libsecret-1-dev ` .
38
40
* ** Android SDK & NDK** : Required for building Android libraries. ` sdkmanager `
39
41
can be used for installation. CMake for Android (version 3.10.2
40
42
recommended) is also needed.
41
43
* ** (Windows Only) Strings** : From Microsoft Sysinternals, required for
42
44
Android builds on Windows.
43
45
* ** Cocoapods** : Required for building iOS or tvOS libraries.
44
46
47
+ To build for Desktop, you can install prerequisites by running the following
48
+ script in the root of the repository: ` scripts/gha/install_prereqs_desktop.py `
49
+
50
+ To build for Android, you can install prerequisites by running the following
51
+ script in the root of the repository: ` build_scripts/android/install_prereqs.sh `
52
+
45
53
## Building the SDK
46
54
47
55
The SDK uses CMake for C++ compilation and Gradle for Android-specific parts.
@@ -50,15 +58,16 @@ The SDK uses CMake for C++ compilation and Gradle for Android-specific parts.
50
58
51
59
1 . Create a build directory (e.g., ` mkdir desktop_build && cd desktop_build ` ).
52
60
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 .. `
61
+ * For Desktop: Run as is. You can use BORINGSSL instead of OpenSSL (for fewer
62
+ system dependencies with the ` -DFIREBASE_USE_BORINGSSL=YES ` parameter.
63
+ * For iOS, include the ` -DCMAKE_TOOLCHAIN_FILE=../cmake/toolchains/ios.cmake `
64
+ parameter. This requires running on a Mac build machine.
60
65
3 . Build specific targets: ` cmake --build . --target firebase_analytics `
61
66
(replace ` firebase_analytics ` with the desired library).
67
+ Or omit the entire ` --target ` parameter to build all targets.
68
+
69
+ You can also use the ` scripts/gha/build_desktop.py ` script to build the full
70
+ desktop SDK.
62
71
63
72
Refer to ` README.md ` for details on CMake generators and providing custom
64
73
third-party dependency locations.
@@ -76,6 +85,9 @@ This command should be run from the root of the repository. Proguard files are
76
85
generated in each library's build directory (e.g.,
77
86
` analytics/build/analytics.pro ` ).
78
87
88
+ You can build the entire SDK for Android by running ` ./gradlew build ` or
89
+ ` build_scripts/android/build.sh ` .
90
+
79
91
### Desktop Platform Setup Details
80
92
81
93
When setting up for desktop, if you are using an iOS
0 commit comments