Skip to content

Commit caac2ce

Browse files
authored
Add FIRESTORE_INCLUDE_OBJC cmake cache variable to provide a way to avoid building the Firestore Objective-C layer. (#9658)
1 parent a4be536 commit caac2ce

File tree

3 files changed

+12
-0
lines changed

3 files changed

+12
-0
lines changed

Firestore/CMakeLists.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15+
# Provide a mechanism for firebase-cpp-sdk to avoid unnecessarily building
16+
# the Objective-C APIs and Tests, which it doesn't use.
17+
option(FIRESTORE_INCLUDE_OBJC "Build the Firestore Objective-C layer" ON)
18+
1519
add_subdirectory(Protos)
1620
add_subdirectory(Source)
1721
add_subdirectory(core)

Firestore/Example/CMakeLists.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15+
if(NOT FIRESTORE_INCLUDE_OBJC)
16+
return()
17+
endif()
18+
1519
add_subdirectory(Benchmarks)
1620

1721
add_subdirectory(App)

Firestore/Source/CMakeLists.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,10 @@ if(NOT APPLE)
1616
return()
1717
endif()
1818

19+
if(NOT FIRESTORE_INCLUDE_OBJC)
20+
return()
21+
endif()
22+
1923
file(GLOB headers Public/FirebaseFirestore/*.h)
2024
file(GLOB sources API/*.h API/*.m API/*.mm)
2125

0 commit comments

Comments
 (0)