Skip to content

Commit e609654

Browse files
committed
Merge remote-tracking branch 'origin/master' into ghm
2 parents fb49fd5 + b22d521 commit e609654

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+125
-109
lines changed

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -190,14 +190,14 @@ Currently, the third party libraries that can be provided this way are:
190190

191191
#### Building with CMake for iOS
192192
The Firebase C++ SDK comes with a CMake config file to build the library for
193-
iOS platforms, [cmake/ios.cmake](/cmake/ios.cmake). In order to build with it,
194-
when running the CMake configuration pass it in with the CMAKE_TOOLCHAIN_FILE
195-
definition. For example, to build the Analytics library for iOS, you could run
196-
the following commands:
193+
iOS platforms, [cmake/toolchains/ios.cmake](/cmake/toolchains/ios.cmake). In
194+
order to build with it, when running the CMake configuration pass it in with
195+
the CMAKE_TOOLCHAIN_FILE definition. For example, to build the Analytics
196+
library for iOS, you could run the following commands:
197197

198198
``` bash
199199
mkdir ios_build && cd ios_build
200-
cmake -DCMAKE_TOOLCHAIN_FILE=../cmake/ios.cmake ..
200+
cmake -DCMAKE_TOOLCHAIN_FILE=../cmake/toolchains/ios.cmake ..
201201
cmake --build . --target firebase_analytics
202202
```
203203

app/CMakeLists.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -191,6 +191,11 @@ else()
191191
systems via: \
192192
apt-get install libsecret-1-dev")
193193
endif()
194+
# If building for 32 bit, the include directories might need to be fixed.
195+
if("${CMAKE_CXX_FLAGS}" MATCHES "-m32")
196+
string(REGEX REPLACE "x86_64" "i386"
197+
LIBSECRET_INCLUDE_DIRS "${LIBSECRET_INCLUDE_DIRS}")
198+
endif()
194199
set(app_desktop_extra_SRCS
195200
src/secure/user_secure_linux_internal.cc
196201
src/locale.cc

cmake/cpp_pack.cmake

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,13 @@ if(${FIREBASE_CPP_BUILD_PACKAGE})
4646
elseif(APPLE)
4747
set(FIREBASE_LIB_CONFIG_PATH "darwin")
4848
else()
49-
set(FIREBASE_LIB_CONFIG_PATH "linux")
49+
# Check if building for 32 bit
50+
message(STATUS "CMAKE_CXX_FLAGS: ${CMAKE_CXX_FLAGS}")
51+
if("${CMAKE_CXX_FLAGS}" MATCHES "-m32")
52+
set(FIREBASE_LIB_CONFIG_PATH "linux/i386")
53+
else()
54+
set(FIREBASE_LIB_CONFIG_PATH "linux/x86_64")
55+
endif()
5056
endif()
5157
endif()
5258

File renamed without changes.
File renamed without changes.

cmake/toolchains/linux_32.cmake

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Toolchain file for building 32-bit Linux libraries
2+
3+
set(CMAKE_C_FLAGS -m32)
4+
set(CMAKE_CXX_FLAGS -m32)
5+
set(CMAKE_LIBRARY_PATH "/usr/lib/i386-linux-gnu")

firestore/src/android/event_listener_android.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
#include "firestore/src/android/query_snapshot_android.h"
1212
#include "firestore/src/android/util_android.h"
1313
#include "firestore/src/include/firebase/firestore/query_snapshot.h"
14-
#include "firebase-ios-sdk/Firestore/core/include/firebase/firestore/firestore_errors.h"
14+
#include "Firestore/core/include/firebase/firestore/firestore_errors.h"
1515

1616
namespace firebase {
1717
namespace firestore {

firestore/src/android/field_path_android.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
#if defined(__ANDROID__)
77
#include "firestore/src/android/field_path_portable.h"
88
#else // defined(__ANDROID__)
9-
#include "firebase-ios-sdk/Firestore/core/src/firebase/firestore/model/field_path.h"
9+
#include "Firestore/core/src/firebase/firestore/model/field_path.h"
1010
#endif // defined(__ANDROID__)
1111

1212
namespace firebase {

firestore/src/android/field_value_android.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99
#include "firestore/src/android/wrapper.h"
1010
#include "firestore/src/include/firebase/firestore/document_reference.h"
1111
#include "firestore/src/include/firebase/firestore/field_value.h"
12-
#include "firebase-ios-sdk/Firestore/core/include/firebase/firestore/geo_point.h"
13-
#include "firebase-ios-sdk/Firestore/core/include/firebase/firestore/timestamp.h"
12+
#include "Firestore/core/include/firebase/firestore/geo_point.h"
13+
#include "Firestore/core/include/firebase/firestore/timestamp.h"
1414

1515
namespace firebase {
1616
namespace firestore {

firestore/src/android/firebase_firestore_exception_android.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
#include "app/src/include/firebase/app.h"
77
#include "app/src/util_android.h"
8-
#include "firebase-ios-sdk/Firestore/core/include/firebase/firestore/firestore_errors.h"
8+
#include "Firestore/core/include/firebase/firestore/firestore_errors.h"
99

1010
namespace firebase {
1111
namespace firestore {

0 commit comments

Comments
 (0)