aboutsummaryrefslogtreecommitdiffhomepage
path: root/FirebaseFirestore.podspec
diff options
context:
space:
mode:
authorGravatar Gil <mcg@google.com>2018-01-19 12:20:46 -0800
committerGravatar GitHub <noreply@github.com>2018-01-19 12:20:46 -0800
commit9f7c094f9f00a6efc0107071f109ef1bc4d7357d (patch)
tree98326bf2f1190338ddc451ea5418bbc4b3348008 /FirebaseFirestore.podspec
parent6a6e14822fc8c4ec16e9045b23b515b4baad14fd (diff)
Add platform detection logic for SecureRandom (#676)
* Add CMake platform detection logic for SecureRandom Now only builds secure_random_arc4random.cc if available. Remove firebase/firestore/base/port.h. Nothing else was in that directory. * Add a SecureRandom implementation that uses OpenSSL This is usable on Linux, Windows, and Android * Properly check return from RAND_bytes
Diffstat (limited to 'FirebaseFirestore.podspec')
-rw-r--r--FirebaseFirestore.podspec11
1 files changed, 10 insertions, 1 deletions
diff --git a/FirebaseFirestore.podspec b/FirebaseFirestore.podspec
index b6b2966..af8770b 100644
--- a/FirebaseFirestore.podspec
+++ b/FirebaseFirestore.podspec
@@ -47,7 +47,8 @@ Google Cloud Firestore is a NoSQL document database built for automatic scaling,
# Exclude alternate implementations for other platforms
'Firestore/core/src/firebase/firestore/util/assert_stdio.cc',
- 'Firestore/core/src/firebase/firestore/util/log_stdio.cc'
+ 'Firestore/core/src/firebase/firestore/util/log_stdio.cc',
+ 'Firestore/core/src/firebase/firestore/util/secure_random_openssl.cc'
]
s.public_header_files = 'Firestore/Source/Public/*.h'
@@ -66,4 +67,12 @@ Google Cloud Firestore is a NoSQL document database built for automatic scaling,
'"${PODS_TARGET_SRCROOT}/Firestore/third_party/abseil-cpp"',
'OTHER_CFLAGS' => '-DFIRFirestore_VERSION=' + s.version.to_s
}
+
+ s.prepare_command = <<-CMD
+ # Generate a version of the config.h header suitable for building with
+ # CocoaPods.
+ sed '/^#cmakedefine/ d' \
+ Firestore/core/src/firebase/firestore/util/config.h.in > \
+ Firestore/core/src/firebase/firestore/util/config.h
+ CMD
end