aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorrsgowman <rgowman@google.com>2018-07-18 12:58:22 -0400
committerGitHub <noreply@github.com>2018-07-18 12:58:22 -0400
commit06d08009f6b67d0dc581e83766dffc81cd1cd902 (patch)
tree2d3f52b454784caaeb21b53009909b69d6d54777
parent40d5e8860a30fa4be7052788812bf19352470a82 (diff)
Fix broken build under linux (#1551)
FirebaseAuthInterop isn't defined as a target under linux (since it comes from the podfiles) so defining a source file for the target causes cmake to error.
-rw-r--r--Firestore/CMakeLists.txt30
1 files changed, 16 insertions, 14 deletions
diff --git a/Firestore/CMakeLists.txt b/Firestore/CMakeLists.txt
index fe7d8f4..8d1cd6c 100644
--- a/Firestore/CMakeLists.txt
+++ b/Firestore/CMakeLists.txt
@@ -148,20 +148,22 @@ podspec_framework(
${FIREBASE_SOURCE_DIR}/FirebaseAuthInterop.podspec
)
-# FirebaseAuthInterop has no source files but CMake can't build frameworks that don't
-# have sources. Generate an inconsequential source file so that the library can
-# be linked.
-file(
- WRITE ${CMAKE_CURRENT_BINARY_DIR}/FirebaseAuthInteropDummy.c
- "// generated file for header-only CMake support.
- __attribute__((unused))
- static void FirebaseAuthInteropFakeSymbol() {}
- "
-)
-target_sources(
- FirebaseAuthInterop
- PRIVATE ${CMAKE_CURRENT_BINARY_DIR}/FirebaseAuthInteropDummy.c
-)
+if(APPLE)
+ # FirebaseAuthInterop has no source files but CMake can't build frameworks
+ # that don't have sources. Generate an inconsequential source file so that
+ # the library can be linked.
+ file(
+ WRITE ${CMAKE_CURRENT_BINARY_DIR}/FirebaseAuthInteropDummy.c
+ "// generated file for header-only CMake support.
+ __attribute__((unused))
+ static void FirebaseAuthInteropFakeSymbol() {}
+ "
+ )
+ target_sources(
+ FirebaseAuthInterop
+ PRIVATE ${CMAKE_CURRENT_BINARY_DIR}/FirebaseAuthInteropDummy.c
+ )
+endif()
# Superbuild installed results