Skip to content

Commit d93e98e

Browse files
authored
Use external repo for GoogleUtilities cmake build (#7324)
1 parent 54ee32e commit d93e98e

File tree

5 files changed

+42
-6
lines changed

5 files changed

+42
-6
lines changed

CMakeLists.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -264,6 +264,5 @@ endif()
264264

265265
add_subdirectory(FirebaseCore)
266266
add_subdirectory(Firestore)
267-
add_subdirectory(GoogleUtilities)
268267
add_subdirectory(Interop/Auth)
269268
add_subdirectory(Interop/CoreDiagnostics)

FirebaseCore/CMakeLists.txt

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

19+
# GoogleUtilities is an external dependency without its own cmake configuration.
20+
include(GoogleUtilities)
21+
1922
file(GLOB headers Sources/Private/*.h Sources/Public/FirebaseCore/*.h)
2023
file(GLOB sources Sources/*.m)
2124

GoogleUtilities/CMakeLists.txt renamed to cmake/GoogleUtilities.cmake

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,14 @@ endif()
1919
# Environment and Logger subspecs
2020
file(
2121
GLOB sources
22-
Environment/*.m
23-
Environment/third_party/*.m
24-
Logger/*.m
22+
${FIREBASE_EXTERNAL_SOURCE_DIR}/GoogleUtilities/GoogleUtilities/Environment/*.m
23+
${FIREBASE_EXTERNAL_SOURCE_DIR}/GoogleUtilities/GoogleUtilities/Environment/third_party/*.m
24+
${FIREBASE_EXTERNAL_SOURCE_DIR}/GoogleUtilities/GoogleUtilities/Logger/*.m
2525
)
2626
file(
2727
GLOB headers
28-
Environment/Public/GoogleUtilities/*.h
29-
Logger/Public/GoogleUtilities/*.h
28+
${FIREBASE_EXTERNAL_SOURCE_DIR}/GoogleUtilities/GoogleUtilities/Environment/Public/GoogleUtilities/*.h
29+
${FIREBASE_EXTERNAL_SOURCE_DIR}/GoogleUtilities/GoogleUtilities/Logger/Public/GoogleUtilities/*.h
3030
)
3131

3232
firebase_ios_add_framework(

cmake/external/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ include(benchmark)
2828
include(boringssl)
2929
include(c-ares)
3030
include(googletest)
31+
include(GoogleUtilities)
3132
include(grpc)
3233
include(leveldb)
3334
include(libfuzzer)

cmake/external/GoogleUtilities.cmake

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# Copyright 2021 Google LLC
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
include(ExternalProject)
16+
17+
set(version 7.2.0)
18+
19+
ExternalProject_Add(
20+
GoogleUtilities
21+
22+
DOWNLOAD_DIR ${FIREBASE_DOWNLOAD_DIR}
23+
DOWNLOAD_NAME GoogleUtilities-${version}.tar.gz
24+
URL https://github.com/google/GoogleUtilities/archive/${version}.tar.gz
25+
URL_HASH SHA256=93c92b28c49b8f7e8cccc2cefe6411fad6e68cbf9638422d3e7ca537cca881a8
26+
27+
PREFIX ${PROJECT_BINARY_DIR}
28+
29+
CONFIGURE_COMMAND ""
30+
BUILD_COMMAND ""
31+
INSTALL_COMMAND ""
32+
TEST_COMMAND ""
33+
)

0 commit comments

Comments
 (0)