Skip to content

Commit

Permalink
build: add support for platform selection in firebase-cpp-sdk
Browse files Browse the repository at this point in the history
swift-firebase uses the firebase-cpp-sdk as a foundation for building
the Swift interfaces. This is a native C++ library which requires a
variant for each supported platform. Generalise the path selection to
support additional platforms such as Android.
  • Loading branch information
compnerd committed Mar 26, 2024
1 parent cf02bda commit d10aa46
Showing 1 changed file with 13 additions and 4 deletions.
17 changes: 13 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,19 @@ target_compile_options(firebase INTERFACE
target_include_directories(firebase INTERFACE
Sources/firebase/include
third_party/firebase-development/usr/include)
target_link_directories(firebase INTERFACE
third_party/firebase-development/usr/libs/windows
third_party/firebase-development/usr/libs/windows/deps/app
third_party/firebase-development/usr/libs/windows/deps/app/external)
if(ANDROID)
target_link_directories(firebase INTERFACE
third_party/firebase-development/usr/libs/android
third_party/firebase-development/usr/libs/android/deps/app
third_party/firebase-development/usr/libs/android/deps/app/external)
elseif(WIN32)
target_link_directories(firebase INTERFACE
third_party/firebase-development/usr/libs/windows
third_party/firebase-development/usr/libs/windows/deps/app
third_party/firebase-development/usr/libs/windows/deps/app/external)
else()
message(FATAL_ERROR "unsupported firebase-cpp-sdk platform")
endif()

add_library(FirebaseCore SHARED
Sources/FirebaseCore/FirebaseApp+Swift.swift
Expand Down

0 comments on commit d10aa46

Please sign in to comment.