作者: 韩晨旭@ArcueidType(Arcueid) 10225101440 李畅@wesley 10225102463 设计文档为PLAN.md,md版本报告为README.md,pdf版本报告为Report.pdf
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

414 lines
15 KiB

  1. # Copyright 2017 The LevelDB Authors. All rights reserved.
  2. # Use of this source code is governed by a BSD-style license that can be
  3. # found in the LICENSE file. See the AUTHORS file for names of contributors.
  4. cmake_minimum_required(VERSION 3.9)
  5. project(Leveldb VERSION 0.1.0 LANGUAGES C CXX)
  6. # This project can take advantage of C++11.
  7. set(CMAKE_CXX_STANDARD 11)
  8. set(CMAKE_CXX_STANDARD_REQUIRED OFF)
  9. set(CMAKE_CXX_EXTENSIONS OFF)
  10. option(LEVELDB_BUILD_TESTS "Build LevelDB's unit tests" ON)
  11. option(LEVELDB_BUILD_BENCHMARKS "Build LevelDB's benchmarks" ON)
  12. option(LEVELDB_INSTALL "Install LevelDB's header and library" ON)
  13. include(TestBigEndian)
  14. test_big_endian(LEVELDB_IS_BIG_ENDIAN)
  15. include(CheckIncludeFile)
  16. check_include_file("unistd.h" HAVE_UNISTD_H)
  17. include(CheckIncludeFileCXX)
  18. check_include_file_cxx("atomic" LEVELDB_ATOMIC_PRESENT)
  19. include(CheckLibraryExists)
  20. check_library_exists(crc32c crc32c_value "" HAVE_CRC32C)
  21. check_library_exists(snappy snappy_compress "" HAVE_SNAPPY)
  22. check_library_exists(tcmalloc malloc "" HAVE_TCMALLOC)
  23. include(CheckSymbolExists)
  24. check_symbol_exists(fdatasync "unistd.h" HAVE_FDATASYNC)
  25. include(CheckCXXSourceCompiles)
  26. # Test whether -Wthread-safety is available. See
  27. # https://clang.llvm.org/docs/ThreadSafetyAnalysis.html
  28. # -Werror is necessary because unknown attributes only generate warnings.
  29. set(OLD_CMAKE_REQUIRED_FLAGS ${CMAKE_REQUIRED_FLAGS})
  30. list(APPEND CMAKE_REQUIRED_FLAGS -Werror -Wthread-safety)
  31. check_cxx_source_compiles("
  32. struct __attribute__((lockable)) Lock {
  33. void Acquire() __attribute__((exclusive_lock_function()));
  34. void Release() __attribute__((unlock_function()));
  35. };
  36. struct ThreadSafeType {
  37. Lock lock_;
  38. int data_ __attribute__((guarded_by(lock_)));
  39. };
  40. int main() { return 0; }
  41. " HAVE_CLANG_THREAD_SAFETY)
  42. set(CMAKE_REQUIRED_FLAGS ${OLD_CMAKE_REQUIRED_FLAGS})
  43. set(LEVELDB_PUBLIC_INCLUDE_DIR "include/leveldb")
  44. set(LEVELDB_PORT_CONFIG_DIR "include/port")
  45. configure_file(
  46. "${PROJECT_SOURCE_DIR}/port/port_config.h.in"
  47. "${PROJECT_BINARY_DIR}/${LEVELDB_PORT_CONFIG_DIR}/port_config.h"
  48. )
  49. include_directories(
  50. "${PROJECT_BINARY_DIR}/include"
  51. "${PROJECT_SOURCE_DIR}"
  52. )
  53. if(BUILD_SHARED_LIBS)
  54. # Only export LEVELDB_EXPORT symbols from the shared library.
  55. add_compile_options(-fvisibility=hidden)
  56. endif(BUILD_SHARED_LIBS)
  57. # POSIX code is specified separately so we can leave it out in the future.
  58. add_library(leveldb_port_posix OBJECT "")
  59. target_sources(leveldb_port_posix
  60. PRIVATE
  61. "${PROJECT_SOURCE_DIR}/port/port_posix.cc"
  62. PUBLIC
  63. # The headers below are dependencies for leveldb, but aren't needed by users
  64. # that link to the installed version of leveldb and rely on its public API.
  65. $<BUILD_INTERFACE:${PROJECT_BINARY_DIR}/${LEVELDB_PORT_CONFIG_DIR}/port_config.h>
  66. $<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/port/atomic_pointer.h>
  67. $<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/port/port_posix.h>
  68. $<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/port/port.h>
  69. )
  70. if(BUILD_SHARED_LIBS)
  71. set_property(TARGET leveldb_port_posix PROPERTY POSITION_INDEPENDENT_CODE ON)
  72. endif(BUILD_SHARED_LIBS)
  73. add_library(leveldb "")
  74. target_sources(leveldb
  75. PRIVATE
  76. "${PROJECT_SOURCE_DIR}/db/builder.cc"
  77. "${PROJECT_SOURCE_DIR}/db/builder.h"
  78. "${PROJECT_SOURCE_DIR}/db/c.cc"
  79. "${PROJECT_SOURCE_DIR}/db/db_impl.cc"
  80. "${PROJECT_SOURCE_DIR}/db/db_impl.h"
  81. "${PROJECT_SOURCE_DIR}/db/db_iter.cc"
  82. "${PROJECT_SOURCE_DIR}/db/db_iter.h"
  83. "${PROJECT_SOURCE_DIR}/db/dbformat.cc"
  84. "${PROJECT_SOURCE_DIR}/db/dbformat.h"
  85. "${PROJECT_SOURCE_DIR}/db/dumpfile.cc"
  86. "${PROJECT_SOURCE_DIR}/db/filename.cc"
  87. "${PROJECT_SOURCE_DIR}/db/filename.h"
  88. "${PROJECT_SOURCE_DIR}/db/log_format.h"
  89. "${PROJECT_SOURCE_DIR}/db/log_reader.cc"
  90. "${PROJECT_SOURCE_DIR}/db/log_reader.h"
  91. "${PROJECT_SOURCE_DIR}/db/log_writer.cc"
  92. "${PROJECT_SOURCE_DIR}/db/log_writer.h"
  93. "${PROJECT_SOURCE_DIR}/db/memtable.cc"
  94. "${PROJECT_SOURCE_DIR}/db/memtable.h"
  95. "${PROJECT_SOURCE_DIR}/db/repair.cc"
  96. "${PROJECT_SOURCE_DIR}/db/skiplist.h"
  97. "${PROJECT_SOURCE_DIR}/db/snapshot.h"
  98. "${PROJECT_SOURCE_DIR}/db/table_cache.cc"
  99. "${PROJECT_SOURCE_DIR}/db/table_cache.h"
  100. "${PROJECT_SOURCE_DIR}/db/version_edit.cc"
  101. "${PROJECT_SOURCE_DIR}/db/version_edit.h"
  102. "${PROJECT_SOURCE_DIR}/db/version_set.cc"
  103. "${PROJECT_SOURCE_DIR}/db/version_set.h"
  104. "${PROJECT_SOURCE_DIR}/db/write_batch_internal.h"
  105. "${PROJECT_SOURCE_DIR}/db/write_batch.cc"
  106. "${PROJECT_SOURCE_DIR}/port/port.h"
  107. "${PROJECT_SOURCE_DIR}/port/thread_annotations.h"
  108. "${PROJECT_SOURCE_DIR}/table/block_builder.cc"
  109. "${PROJECT_SOURCE_DIR}/table/block_builder.h"
  110. "${PROJECT_SOURCE_DIR}/table/block.cc"
  111. "${PROJECT_SOURCE_DIR}/table/block.h"
  112. "${PROJECT_SOURCE_DIR}/table/filter_block.cc"
  113. "${PROJECT_SOURCE_DIR}/table/filter_block.h"
  114. "${PROJECT_SOURCE_DIR}/table/format.cc"
  115. "${PROJECT_SOURCE_DIR}/table/format.h"
  116. "${PROJECT_SOURCE_DIR}/table/iterator_wrapper.h"
  117. "${PROJECT_SOURCE_DIR}/table/iterator.cc"
  118. "${PROJECT_SOURCE_DIR}/table/merger.cc"
  119. "${PROJECT_SOURCE_DIR}/table/merger.h"
  120. "${PROJECT_SOURCE_DIR}/table/table_builder.cc"
  121. "${PROJECT_SOURCE_DIR}/table/table.cc"
  122. "${PROJECT_SOURCE_DIR}/table/two_level_iterator.cc"
  123. "${PROJECT_SOURCE_DIR}/table/two_level_iterator.h"
  124. "${PROJECT_SOURCE_DIR}/util/arena.cc"
  125. "${PROJECT_SOURCE_DIR}/util/arena.h"
  126. "${PROJECT_SOURCE_DIR}/util/bloom.cc"
  127. "${PROJECT_SOURCE_DIR}/util/cache.cc"
  128. "${PROJECT_SOURCE_DIR}/util/coding.cc"
  129. "${PROJECT_SOURCE_DIR}/util/coding.h"
  130. "${PROJECT_SOURCE_DIR}/util/comparator.cc"
  131. "${PROJECT_SOURCE_DIR}/util/crc32c.cc"
  132. "${PROJECT_SOURCE_DIR}/util/crc32c.h"
  133. "${PROJECT_SOURCE_DIR}/util/env_posix.cc"
  134. "${PROJECT_SOURCE_DIR}/util/env.cc"
  135. "${PROJECT_SOURCE_DIR}/util/filter_policy.cc"
  136. "${PROJECT_SOURCE_DIR}/util/hash.cc"
  137. "${PROJECT_SOURCE_DIR}/util/hash.h"
  138. "${PROJECT_SOURCE_DIR}/util/logging.cc"
  139. "${PROJECT_SOURCE_DIR}/util/logging.h"
  140. "${PROJECT_SOURCE_DIR}/util/mutexlock.h"
  141. "${PROJECT_SOURCE_DIR}/util/options.cc"
  142. "${PROJECT_SOURCE_DIR}/util/posix_logger.h"
  143. "${PROJECT_SOURCE_DIR}/util/random.h"
  144. "${PROJECT_SOURCE_DIR}/util/status.cc"
  145. $<TARGET_OBJECTS:leveldb_port_posix>
  146. # Only CMake 3.3+ supports PUBLIC sources in targets exported by "install".
  147. $<$<VERSION_GREATER:CMAKE_VERSION,3.2>:PUBLIC>
  148. "${LEVELDB_PUBLIC_INCLUDE_DIR}/c.h"
  149. "${LEVELDB_PUBLIC_INCLUDE_DIR}/cache.h"
  150. "${LEVELDB_PUBLIC_INCLUDE_DIR}/comparator.h"
  151. "${LEVELDB_PUBLIC_INCLUDE_DIR}/db.h"
  152. "${LEVELDB_PUBLIC_INCLUDE_DIR}/dumpfile.h"
  153. "${LEVELDB_PUBLIC_INCLUDE_DIR}/env.h"
  154. "${LEVELDB_PUBLIC_INCLUDE_DIR}/export.h"
  155. "${LEVELDB_PUBLIC_INCLUDE_DIR}/filter_policy.h"
  156. "${LEVELDB_PUBLIC_INCLUDE_DIR}/iterator.h"
  157. "${LEVELDB_PUBLIC_INCLUDE_DIR}/options.h"
  158. "${LEVELDB_PUBLIC_INCLUDE_DIR}/slice.h"
  159. "${LEVELDB_PUBLIC_INCLUDE_DIR}/status.h"
  160. "${LEVELDB_PUBLIC_INCLUDE_DIR}/table_builder.h"
  161. "${LEVELDB_PUBLIC_INCLUDE_DIR}/table.h"
  162. "${LEVELDB_PUBLIC_INCLUDE_DIR}/write_batch.h"
  163. )
  164. # MemEnv is not part of the interface and could be pulled to a separate library.
  165. target_sources(leveldb
  166. PRIVATE
  167. "${PROJECT_SOURCE_DIR}/helpers/memenv/memenv.cc"
  168. "${PROJECT_SOURCE_DIR}/helpers/memenv/memenv.h"
  169. )
  170. target_include_directories(leveldb
  171. PUBLIC
  172. $<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/include>
  173. $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>
  174. )
  175. target_compile_definitions(leveldb
  176. PRIVATE
  177. # Used by include/export.h when building shared libraries.
  178. LEVELDB_COMPILE_LIBRARY
  179. # Used by port/port.h.
  180. LEVELDB_PLATFORM_POSIX=1
  181. )
  182. if(BUILD_SHARED_LIBS)
  183. target_compile_definitions(leveldb
  184. PUBLIC
  185. # Used by include/export.h.
  186. LEVELDB_SHARED_LIBRARY
  187. )
  188. endif(BUILD_SHARED_LIBS)
  189. if(HAVE_CLANG_THREAD_SAFETY)
  190. target_compile_options(leveldb
  191. PUBLIC
  192. -Werror -Wthread-safety)
  193. endif(HAVE_CLANG_THREAD_SAFETY)
  194. # TODO(costan): This is only needed for port_posix.
  195. set(THREADS_PREFER_PTHREAD_FLAG ON)
  196. find_package(Threads REQUIRED)
  197. target_link_libraries(leveldb Threads::Threads)
  198. if(HAVE_CRC32C)
  199. target_link_libraries(leveldb crc32c)
  200. endif(HAVE_CRC32C)
  201. if(HAVE_SNAPPY)
  202. target_link_libraries(leveldb snappy)
  203. endif(HAVE_SNAPPY)
  204. if(HAVE_TCMALLOC)
  205. target_link_libraries(leveldb tcmalloc)
  206. endif(HAVE_TCMALLOC)
  207. add_executable(leveldbutil
  208. "${PROJECT_SOURCE_DIR}/db/leveldbutil.cc"
  209. )
  210. target_link_libraries(leveldbutil leveldb)
  211. if(LEVELDB_BUILD_TESTS)
  212. enable_testing()
  213. function(leveldb_test test_file)
  214. get_filename_component(test_target_name "${test_file}" NAME_WE)
  215. add_executable("${test_target_name}" "")
  216. target_sources("${test_target_name}"
  217. PRIVATE
  218. "${PROJECT_BINARY_DIR}/${LEVELDB_PORT_CONFIG_DIR}/port_config.h"
  219. "${PROJECT_SOURCE_DIR}/util/testharness.cc"
  220. "${PROJECT_SOURCE_DIR}/util/testharness.h"
  221. "${PROJECT_SOURCE_DIR}/util/testutil.cc"
  222. "${PROJECT_SOURCE_DIR}/util/testutil.h"
  223. "${test_file}"
  224. )
  225. if(BUILD_SHARED_LIBS)
  226. # Port functions aren't exposed in the shared library build.
  227. target_sources("${test_target_name}"
  228. PRIVATE
  229. $<TARGET_OBJECTS:leveldb_port_posix>
  230. )
  231. endif(BUILD_SHARED_LIBS)
  232. target_link_libraries("${test_target_name}" leveldb)
  233. target_compile_definitions("${test_target_name}"
  234. PRIVATE
  235. LEVELDB_PLATFORM_POSIX=1
  236. )
  237. add_test(NAME "${test_target_name}" COMMAND "${test_target_name}")
  238. endfunction(leveldb_test)
  239. leveldb_test("${PROJECT_SOURCE_DIR}/db/c_test.c")
  240. leveldb_test("${PROJECT_SOURCE_DIR}/db/fault_injection_test.cc")
  241. leveldb_test("${PROJECT_SOURCE_DIR}/issues/issue178_test.cc")
  242. leveldb_test("${PROJECT_SOURCE_DIR}/issues/issue200_test.cc")
  243. leveldb_test("${PROJECT_SOURCE_DIR}/util/env_test.cc")
  244. if(NOT BUILD_SHARED_LIBS)
  245. leveldb_test("${PROJECT_SOURCE_DIR}/db/autocompact_test.cc")
  246. leveldb_test("${PROJECT_SOURCE_DIR}/db/corruption_test.cc")
  247. leveldb_test("${PROJECT_SOURCE_DIR}/db/db_test.cc")
  248. leveldb_test("${PROJECT_SOURCE_DIR}/db/dbformat_test.cc")
  249. leveldb_test("${PROJECT_SOURCE_DIR}/db/filename_test.cc")
  250. leveldb_test("${PROJECT_SOURCE_DIR}/db/log_test.cc")
  251. leveldb_test("${PROJECT_SOURCE_DIR}/db/recovery_test.cc")
  252. leveldb_test("${PROJECT_SOURCE_DIR}/db/skiplist_test.cc")
  253. leveldb_test("${PROJECT_SOURCE_DIR}/db/version_edit_test.cc")
  254. leveldb_test("${PROJECT_SOURCE_DIR}/db/version_set_test.cc")
  255. leveldb_test("${PROJECT_SOURCE_DIR}/db/write_batch_test.cc")
  256. leveldb_test("${PROJECT_SOURCE_DIR}/helpers/memenv/memenv_test.cc")
  257. leveldb_test("${PROJECT_SOURCE_DIR}/table/filter_block_test.cc")
  258. leveldb_test("${PROJECT_SOURCE_DIR}/table/table_test.cc")
  259. leveldb_test("${PROJECT_SOURCE_DIR}/util/arena_test.cc")
  260. leveldb_test("${PROJECT_SOURCE_DIR}/util/bloom_test.cc")
  261. leveldb_test("${PROJECT_SOURCE_DIR}/util/cache_test.cc")
  262. leveldb_test("${PROJECT_SOURCE_DIR}/util/coding_test.cc")
  263. leveldb_test("${PROJECT_SOURCE_DIR}/util/crc32c_test.cc")
  264. leveldb_test("${PROJECT_SOURCE_DIR}/util/hash_test.cc")
  265. # TODO(costan): This test also uses
  266. # "${PROJECT_SOURCE_DIR}/util/env_posix_test_helper.h"
  267. leveldb_test("${PROJECT_SOURCE_DIR}/util/env_posix_test.cc")
  268. endif(NOT BUILD_SHARED_LIBS)
  269. endif(LEVELDB_BUILD_TESTS)
  270. if(LEVELDB_BUILD_BENCHMARKS)
  271. function(leveldb_benchmark bench_file)
  272. get_filename_component(bench_target_name "${bench_file}" NAME_WE)
  273. add_executable("${bench_target_name}" "")
  274. target_sources("${bench_target_name}"
  275. PRIVATE
  276. "${PROJECT_BINARY_DIR}/${LEVELDB_PORT_CONFIG_DIR}/port_config.h"
  277. "${PROJECT_SOURCE_DIR}/util/histogram.cc"
  278. "${PROJECT_SOURCE_DIR}/util/histogram.h"
  279. "${PROJECT_SOURCE_DIR}/util/testharness.cc"
  280. "${PROJECT_SOURCE_DIR}/util/testharness.h"
  281. "${PROJECT_SOURCE_DIR}/util/testutil.cc"
  282. "${PROJECT_SOURCE_DIR}/util/testutil.h"
  283. "${bench_file}"
  284. )
  285. if(BUILD_SHARED_LIBS)
  286. # Port functions aren't exposed in the shared library build.
  287. target_sources("${bench_target_name}"
  288. PRIVATE
  289. $<TARGET_OBJECTS:leveldb_port_posix>
  290. )
  291. endif(BUILD_SHARED_LIBS)
  292. target_link_libraries("${bench_target_name}" leveldb)
  293. target_compile_definitions("${bench_target_name}"
  294. PRIVATE
  295. LEVELDB_PLATFORM_POSIX=1
  296. )
  297. endfunction(leveldb_benchmark)
  298. if(NOT BUILD_SHARED_LIBS)
  299. leveldb_benchmark("${PROJECT_SOURCE_DIR}/db/db_bench.cc")
  300. endif(NOT BUILD_SHARED_LIBS)
  301. check_library_exists(sqlite3 sqlite3_open "" HAVE_SQLITE3)
  302. if(HAVE_SQLITE3)
  303. leveldb_benchmark("${PROJECT_SOURCE_DIR}/doc/bench/db_bench_sqlite3.cc")
  304. target_link_libraries(db_bench_sqlite3 sqlite3)
  305. endif(HAVE_SQLITE3)
  306. # check_library_exists is insufficient here because the library names have
  307. # different manglings when compiled with clang or gcc, at least when installed
  308. # with Homebrew on Mac.
  309. set(OLD_CMAKE_REQURED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES})
  310. list(APPEND CMAKE_REQUIRED_LIBRARIES kyotocabinet)
  311. check_cxx_source_compiles("
  312. #include <kcpolydb.h>
  313. int main() {
  314. kyotocabinet::TreeDB* db = new kyotocabinet::TreeDB();
  315. delete db;
  316. return 0;
  317. }
  318. " HAVE_KYOTOCABINET)
  319. set(CMAKE_REQUIRED_LIBRARIES ${OLD_CMAKE_REQURED_LIBRARIES})
  320. if(HAVE_KYOTOCABINET)
  321. leveldb_benchmark("${PROJECT_SOURCE_DIR}/doc/bench/db_bench_tree_db.cc")
  322. target_link_libraries(db_bench_tree_db kyotocabinet)
  323. endif(HAVE_KYOTOCABINET)
  324. endif(LEVELDB_BUILD_BENCHMARKS)
  325. if(LEVELDB_INSTALL)
  326. include(GNUInstallDirs)
  327. install(TARGETS leveldb
  328. EXPORT LeveldbTargets
  329. RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
  330. LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
  331. ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
  332. )
  333. install(
  334. FILES
  335. "${PROJECT_SOURCE_DIR}/${LEVELDB_PUBLIC_INCLUDE_DIR}/c.h"
  336. "${PROJECT_SOURCE_DIR}/${LEVELDB_PUBLIC_INCLUDE_DIR}/cache.h"
  337. "${PROJECT_SOURCE_DIR}/${LEVELDB_PUBLIC_INCLUDE_DIR}/comparator.h"
  338. "${PROJECT_SOURCE_DIR}/${LEVELDB_PUBLIC_INCLUDE_DIR}/db.h"
  339. "${PROJECT_SOURCE_DIR}/${LEVELDB_PUBLIC_INCLUDE_DIR}/dumpfile.h"
  340. "${PROJECT_SOURCE_DIR}/${LEVELDB_PUBLIC_INCLUDE_DIR}/env.h"
  341. "${PROJECT_SOURCE_DIR}/${LEVELDB_PUBLIC_INCLUDE_DIR}/export.h"
  342. "${PROJECT_SOURCE_DIR}/${LEVELDB_PUBLIC_INCLUDE_DIR}/filter_policy.h"
  343. "${PROJECT_SOURCE_DIR}/${LEVELDB_PUBLIC_INCLUDE_DIR}/iterator.h"
  344. "${PROJECT_SOURCE_DIR}/${LEVELDB_PUBLIC_INCLUDE_DIR}/options.h"
  345. "${PROJECT_SOURCE_DIR}/${LEVELDB_PUBLIC_INCLUDE_DIR}/slice.h"
  346. "${PROJECT_SOURCE_DIR}/${LEVELDB_PUBLIC_INCLUDE_DIR}/status.h"
  347. "${PROJECT_SOURCE_DIR}/${LEVELDB_PUBLIC_INCLUDE_DIR}/table_builder.h"
  348. "${PROJECT_SOURCE_DIR}/${LEVELDB_PUBLIC_INCLUDE_DIR}/table.h"
  349. "${PROJECT_SOURCE_DIR}/${LEVELDB_PUBLIC_INCLUDE_DIR}/write_batch.h"
  350. DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/leveldb
  351. )
  352. include(CMakePackageConfigHelpers)
  353. write_basic_package_version_file(
  354. "${PROJECT_BINARY_DIR}/LeveldbConfigVersion.cmake"
  355. COMPATIBILITY SameMajorVersion
  356. )
  357. install(
  358. EXPORT LeveldbTargets
  359. NAMESPACE Leveldb::
  360. DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/Leveldb"
  361. )
  362. install(
  363. FILES
  364. "${PROJECT_SOURCE_DIR}/cmake/LeveldbConfig.cmake"
  365. "${PROJECT_BINARY_DIR}/LeveldbConfigVersion.cmake"
  366. DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/Leveldb"
  367. )
  368. endif(LEVELDB_INSTALL)