Skip to main content

firebase-cpp-builder

Instructions and workflows for building the Firebase C++ SDK natively. Use this skill when you need to compile the C++ SDK per-product (e.g., auth, database) across different platforms (Desktop, iOS, Android).

소스 정보

저장소
firebase/firebase-cpp-sdk
최근 소스 활동
2026년 10월 5일 16:53
감지된 SKILL.md 언어
영어
스타
325
포크
138

설치 방법

기본적으로 소스를 먼저 확인하는 Prompt가 선택됩니다. 직접 명령으로 전환하거나 로컬 사본을 다운로드할 수도 있습니다.

소스 파일 검토

설치 여부를 결정하기 전에 SKILL.md와 SkillsMP에 표시된 보조 파일을 읽어 보세요.

SKILL.md 표시 중

SKILL.md
소스 지침 · 읽기 전용 미리보기
name
firebase-cpp-builder
description
Instructions and workflows for building the Firebase C++ SDK natively. Use this skill when you need to compile the C++ SDK per-product (e.g., auth, database) across different platforms (Desktop, iOS, Android).
# Building the Firebase C++ SDK This skill provides instructions on how to build the Firebase C++ SDK directly from source, specifically tailored for building individual products (like `firebase_auth`, `firebase_database`, etc.). ## Prerequisites Before building, ensure that your Python environment is set up with all required dependencies, especially if you plan to use helper scripts: - **Python Dependencies**: Run `pip install -r scripts/gha/python_requirements.txt` to install required libraries (such as `attrs`, `absl-py`, etc.). ## 1. Desktop Builds (Mac, Linux, Windows) The easiest way to build for Desktop is to use the Python helper script from the repository root: ```bash python3 scripts/gha/build_desktop.py -a <arch> --build_dir <dir> ``` _(Plenty more options: run `python3 scripts/gha/build_desktop.py --help` for info.)_ Alternatively, you can build manually with CMake. The build process will automatically download necessary dependencies. ```bash mkdir desktop_build cd desktop_build cmake .. cmake --build . --target firebase_<product> -j ``` _Example: `cmake --build . --target firebase_auth -j`_ ## 2. iOS Builds For iOS, you can use the convenience script from the repository root: ```bash ./build_scripts/ios/build.sh -b ios_build_dir -s . ``` _(Run `./build_scripts/ios/build.sh -h` for more options.)_ Alternatively, you can use CMake's native Xcode generator manually. ```bash mkdir ios_build cd ios_build cmake .. -G Xcode -DCMAKE_SYSTEM_NAME=iOS cmake --build . --target firebase_<product> -j ``` Alternatively, you can build XCFrameworks using the helper script: ```bash python3 scripts/gha/build_ios_tvos.py -s . -b ios_tvos_build ``` ## 3. Android Builds For Android, use the convenience script from the repository root: ```bash ./build_scripts/android/build.sh android_build_dir . ``` _(You can also specify an STL variant with the 3rd parameter. Run the script without any parameters to see the usage.)_ Alternatively, when building the Firebase C++ SDK manually for Android, the repository uses a Gradle wrapper where each product has its own subproject. To build a specific product's AARs, run the gradle build task for that module: ```bash ./gradlew :<product>:build ``` _Example: `./gradlew :auth:build` or `./gradlew :database:build`_ Note that as part of the build process, each library generates a ProGuard file in its build directory (e.g., `<product>/build/<product>.pro`). ## CMake Target Naming Convention When using CMake directly (for Desktop or iOS/tvOS), the targets are consistently named `firebase_<product>`. Common targets include: - `firebase_app` - `firebase_analytics` - `firebase_auth` - `firebase_database` - `firebase_firestore` - `firebase_functions` - `firebase_messaging` - `firebase_remote_config` - `firebase_storage` ## Product Naming Disambiguation (`firebase_auth` vs `auth`) Different build tools use different naming conventions for products in this repository: - **CMake Targets (Desktop/iOS)**: Typically prefixed with `firebase_` (e.g., `firebase_auth`). - **Gradle Subprojects (Android)**: Typically use the raw module name (e.g., `:auth:build`). - **Python Scripts** (e.g., `build_desktop.py`, `build_testapps.py`): Typically use the raw module name (e.g., `--t auth`). > [!TIP] > If you are unsure about the exact product name or supported flags, run Python scripts with `--help` (e.g., `build_desktop.py --help`). For shell scripts, run without parameters (Android) or with `-h` (iOS) to see usage.
GitHub에서 보기