8000 Update AGENTS.md (#1748) · firebase/firebase-cpp-sdk@770a9af · GitHub
[go: up one dir, main page]

Skip to content

Commit 770a9af

Browse files
authored
Update AGENTS.md (#1748)
* Add new GCS service account key file. * Add more information on building. * Added changes.
1 parent e48c5ce commit 770a9af

File tree

1 file changed

+21
-9
lines changed

1 file changed

+21
-9
lines changed

AGENTS.md

Lines changed: 21 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -33,15 +33,23 @@ instructions for your specific platform.
3333
* **CMake**: Version 3.7 or newer.
3434
* **Python**: Version 3.7 or newer.
3535
* **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`.
3840
* **Android SDK & NDK**: Required for building Android libraries. `sdkmanager`
3941
can be used for installation. CMake for Android (version 3.10.2
4042
recommended) is also needed.
4143
* **(Windows Only) Strings**: From Microsoft Sysinternals, required for
4244
Android builds on Windows.
4345
* **Cocoapods**: Required for building iOS or tvOS libraries.
4446

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+
4553
## Building the SDK
4654

4755
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.
5058

5159
1. Create a build directory (e.g., `mkdir desktop_build && cd desktop_build`).
5260
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.
6065
3. Build specific targets: `cmake --build . --target firebase_analytics`
6166
(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.
6271

6372
Refer to `README.md` for details on CMake generators and providing custom
6473
third-party dependency locations.
@@ -76,6 +85,9 @@ This command should be run from the root of the repository. Proguard files are
7685
generated in each library's build directory (e.g.,
7786
`analytics/build/analytics.pro`).
7887

88+
You can build the entire SDK for Android by running `./gradlew build` or
89+
`build_scripts/android/build.sh`.
90+
7991
### Desktop Platform Setup Details
8092

8193
When setting up for desktop, if you are using an iOS

0 commit comments

Comments
 (0)
0