Skip to content

Commit d5931e0

Browse files
authored
Update to a newer version of LevelDB that no longer uses std::call_once on Windows.
This fixes a linker error in Realtime Database on Windows. Also, if we are using leveldb from Firestore, force it to use this same version by copying over our leveldb.cmake into Firestore in the post-external-download step.
1 parent 1d32e80 commit d5931e0

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

cmake/external/leveldb.cmake

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,15 +18,14 @@ if(TARGET leveldb)
1818
return()
1919
endif()
2020

21-
set(version 1.22)
21+
set(version e0d5f83a4f80060fe5b5d80025f0ad049bca430e)
2222

2323
ExternalProject_Add(
2424
leveldb
2525

2626
DOWNLOAD_DIR ${FIREBASE_DOWNLOAD_DIR}
2727
DOWNLOAD_NAME leveldb-${version}.tar.gz
2828
URL https://github.com/google/leveldb/archive/${version}.tar.gz
29-
URL_HASH SHA256=55423cac9e3306f4a9502c738a001e4a339d1a38ffbee7572d4a07d5d63949b2
3029

3130
PREFIX ${PROJECT_BINARY_DIR}
3231

cmake/external_rules.cmake

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,11 @@ function(download_external_sources)
112112
"\n#include <stdlib.h>\n")
113113
endif()
114114
endif()
115+
if (FIREBASE_INCLUDE_FIRESTORE)
116+
# Tweak Firestore's included version of leveldb to match our own.
117+
file(INSTALL "${PROJECT_SOURCE_DIR}/cmake/external/leveldb.cmake"
118+
DESTINATION "${PROJECT_BINARY_DIR}/external/src/firestore/cmake/external")
119+
endif()
115120
endif()
116121
endfunction()
117122

0 commit comments

Comments
 (0)