Skip to content

Commit

Permalink
Firebase pigeon
Browse files Browse the repository at this point in the history
-firebase_core pigeon plugin
 requires homescreen registrar
 requires firebase cpp sdk: https://github.com/firebase/firebase-cpp-sdk
 Set the following variables to build:
 -DBUILD_PLUGIN_FIREBASE_CORE=ON
 -DFIREBASE_CPP_SDK_ROOT_DIR="/mnt/raid10/firebase-cpp-sdk"
 -DFIREBASE_CPP_SDK_BINARY_DIR="/mnt/raid10/firebase-cpp-sdk/build"

Signed-off-by: Joel Winarske <[email protected]>
  • Loading branch information
jwinarske committed Nov 26, 2023
1 parent 9094f0f commit 8b78301
Show file tree
Hide file tree
Showing 13 changed files with 1,246 additions and 4 deletions.
4 changes: 3 additions & 1 deletion cmake/compiler.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,9 @@ COMPILER_FLAGS_APPEND(RELEASE " -fno-omit-frame-pointer" "-f(no-)?omit-frame-poi
COMPILER_FLAGS_APPEND(RELEASE " -Wformat=2" "-Wformat(=[0-9]+)?")
COMPILER_FLAGS_APPEND(RELEASE " -D_FORTIFY_SOURCE=2" "-D_FORTIFY_SOURCE(=[0-9]+)?")

if (NOT BUILD_CRASH_HANDLER)
if (BUILD_PLUGIN_FIREBASE_CORE OR BUILD_CRASH_HANDLER)
string(APPEND CMAKE_CXX_FLAGS " -frtti")
else ()
string(APPEND CMAKE_CXX_FLAGS " -fno-rtti")
endif ()

Expand Down
9 changes: 9 additions & 0 deletions cmake/plugins.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -154,4 +154,13 @@ if (BUILD_PLUGIN_AUDIO_PLAYERS)
pkg_check_modules(GST REQUIRED gstreamer-1.0>=1.4)
endif ()

option(BUILD_PLUGIN_FIREBASE_CORE "Include Firebase Core plugin" OFF)
if (BUILD_PLUGIN_FIREBASE_CORE)
if (EXISTS ${FIREBASE_CPP_SDK_ROOT_DIR})
ENABLE_PLUGIN(firebase_core)
else ()
set(BUILD_PLUGIN_FIREBASE_CORE OFF)
endif ()
endif ()

message(STATUS "Plugin Config .......... ${PLUGINS}")
11 changes: 11 additions & 0 deletions shell/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,17 @@ if (BUILD_PLUGIN_PLATFORM_VIEWS)
)
endif ()

if (BUILD_PLUGIN_FIREBASE_CORE)
target_sources(homescreen PRIVATE
plugins/firebase_core/firebase_core_plugin.cpp
plugins/firebase_core/firebase_core_plugin_c_api.cpp
plugins/firebase_core/firebase_core.cc
)
target_include_directories(homescreen PRIVATE ${FIREBASE_PLUGIN_INCLUDE_DIRS})
target_link_directories(homescreen PRIVATE ${FIREBASE_PLUGIN_LIB_DIRS})
target_link_libraries(homescreen PRIVATE firebase_app flatbuffers z)
endif ()

target_compile_definitions(homescreen
PRIVATE
HAVE_STRCHRNUL
Expand Down
13 changes: 13 additions & 0 deletions shell/plugins/firebase_core/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Firebase Core Plugin

* Pigeon interface

* requires firebase cpp sdk: https://github.com/firebase/firebase-cpp-sdk to exist and be built prior.

* Set the following variables to build

```
-DBUILD_PLUGIN_FIREBASE_CORE=ON
-DFIREBASE_CPP_SDK_ROOT_DIR="/mnt/raid10/firebase-cpp-sdk"
-DFIREBASE_CPP_SDK_BINARY_DIR="/mnt/raid10/firebase-cpp-sdk/build"
```
Loading

0 comments on commit 8b78301

Please sign in to comment.