aboutsummaryrefslogtreecommitdiffhomepage
path: root/cmake/external/FirebaseCore.cmake
diff options
context:
space:
mode:
authorGravatar Gil <mcg@google.com>2018-01-01 21:00:32 -0800
committerGravatar GitHub <noreply@github.com>2018-01-01 21:00:32 -0800
commit13da48d8a4fcdfe288fa15c788c59e7f54edf42c (patch)
tree059bbfffe76ff01eb8241d468e23b22b68001d69 /cmake/external/FirebaseCore.cmake
parent412e759a19117974cca18e86ea44742ae0dec659 (diff)
Build FirebaseCore from CMake (#594)
* Don't bother specifying a download directory to CMake ExternalProject * Teach CMake to build pure Xcode projects as dependencies This allows downstream code (like log_apple.mm) to consume this for testing within the CMake build without requiring a CMake-native build for these components. This makes integrating these components into the cmake build essentially free from the point of view of the consumed component. * Get the CMake build semi-working on Linux again Many prebuilt versions of cmake on Linux lack the ability to download over https so use git to get googletest. Don't attempt to build FirebaseCore on Linux; there's no xcodebuild. Note the build is still ultimately broken because we don't yet have an alternative to arc4random on Linux but at least this is no more broken than it was before.
Diffstat (limited to 'cmake/external/FirebaseCore.cmake')
-rw-r--r--cmake/external/FirebaseCore.cmake23
1 files changed, 23 insertions, 0 deletions
diff --git a/cmake/external/FirebaseCore.cmake b/cmake/external/FirebaseCore.cmake
new file mode 100644
index 0000000..8be6969
--- /dev/null
+++ b/cmake/external/FirebaseCore.cmake
@@ -0,0 +1,23 @@
+# Copyright 2017 Google
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+include(xcodebuild)
+
+if(APPLE)
+ # FirebaseCore is only available as a CocoaPod build.
+ xcodebuild(FirebaseCore)
+else()
+ # On non-Apple platforms, there's no way to build FirebaseCore.
+ add_custom_target(FirebaseCore)
+endif()