@@ -18,60 +18,30 @@ if(TARGET leveldb)
18
18
return ()
19
19
endif ()
20
20
21
- if (WIN32 OR LEVELDB_ROOT )
22
- # If the user has supplied a LEVELDB_ROOT then just use it. Add an empty
23
- # custom target so that the superbuild depdendencies don't all have to be
24
- # conditional.
21
+ if (WIN32 )
22
+ # Unfortunately, LevelDB does not build on Windows (yet). See:
25
23
#
26
- # Also, unfortunately, LevelDB does not build on Windows (yet)
27
- # See:
28
- # https://github.com/google/leveldb/issues/363
29
- # https://github.com/google/leveldb/issues/466
24
+ # * https://github.com/google/leveldb/issues/363
25
+ # * https://github.com/google/leveldb/issues/466
30
26
add_custom_target (leveldb )
31
27
return ()
32
28
endif ()
33
29
34
-
35
- # Clean up warning output to reduce noise in the build
36
- if (CMAKE_CXX_COMPILER_ID MATCHES "Clang|GNU" )
37
- set (
38
- LEVELDB_CXX_FLAGS "\
39
- -Wno-deprecated-declarations"
40
- )
41
- endif ()
42
-
43
- # Map CMake compiler configuration down onto the leveldb Makefile
44
- set (
45
- LEVELDB_OPT "\
46
- $<$<CONFIG:Debug>:${CMAKE_CXX_FLAGS_DEBUG} > \
47
- $<$<CONFIG:Release>:${CMAKE_CXX_FLAGS_RELEASE} >"
48
- )
30
+ # CMake support was added after the 1.20 release
31
+ set (commit 6caf73ad9dae0ee91873bcb39554537b85163770 ) # master@{2018-07-14}
49
32
50
33
ExternalProject_Add (
51
34
leveldb
52
35
53
36
DOWNLOAD_DIR ${FIREBASE_DOWNLOAD_DIR}
54
- DOWNLOAD_NAME leveldb-v1.20 .tar.gz
55
- URL https://github.com/google/leveldb/archive/v1.20 .tar.gz
56
- URL_HASH SHA256=f5abe8b5b209c2f36560b75f32ce61412f39a2922f7045ae764a2c23335b6664
37
+ DOWNLOAD_NAME leveldb-${commit} .tar.gz
38
+ URL https://github.com/google/leveldb/archive/${commit} .tar.gz
39
+ URL_HASH SHA256=255e3283556aff81e337a951c5f5579f5b98b63d5f345db9e97a1f7563f54f9e
57
40
58
- PREFIX ${FIREBASE_BINARY_DIR }
41
+ PREFIX ${PROJECT_BINARY_DIR }
59
42
60
- # LevelDB's configuration is done in the Makefile
61
43
CONFIGURE_COMMAND ""
62
-
63
- # The Makefile-based build of leveldb does not support building
64
- # out-of-source.
65
- BUILD_IN_SOURCE ON
66
-
67
- # Only build the leveldb library skipping the tools and in-memory
68
- # implementation we don't use.
69
- BUILD_COMMAND
70
- env CXXFLAGS=${LEVELDB_CXX_FLAGS} OPT=${LEVELDB_OPT}
71
- make -j out-static/libleveldb.a
72
-
73
- INSTALL_DIR ${FIREBASE_INSTALL_DIR}
74
-
75
- INSTALL_COMMAND ""
76
- TEST_COMMAND ""
44
+ BUILD_COMMAND ""
45
+ INSTALL_COMMAND ""
46
+ TEST_COMMAND ""
77
47
)
0 commit comments