mirror of
https://github.com/ceph/ceph
synced 2024-12-21 02:42:48 +00:00
0f6b9f2816
CMake Ceph Build System (Firefly) CMake. Add tests. Respace src/CMakeLists.txt. CMake. Spacing cleanups. CMake for Firefly is Triumphant CMake for Giant Adapt to Giant. Fix installation for scripts and man pages Fix CEPH_LIBDIR and CEPH_PKGLIBDIR defines Add erasure-code libraries uses try_compile() to detect support for -msse flags Fix rados object classes Propagate Casey's cls library change to src/test. Fix CMake build for Hammer. Try-add rados and common to librbd link. Fix name and linkage of libec_lrc. Rename arch/neon.c arm.c Fix libcommon.a dependencies (some unit tests). Authors: Ali Maredia <ali@cohortfs.com> Casey Bodley <casey@cohortfs.com> Adam Emerson <aemerson@cohortfs.com> Marcus Watts <mdw@cohortfs.com> Matt Benjamin <matt@cohortfs.com> Signed-off-by: Matt Benjamin <matt@cohortfs.com>
38 lines
1.4 KiB
CMake
38 lines
1.4 KiB
CMake
# - Find LevelDB
|
|
#
|
|
# LEVELDB_INCLUDE - Where to find leveldb/db.h
|
|
# LEVELDB_LIBS - List of libraries when using LevelDB.
|
|
# LEVELDB_FOUND - True if LevelDB found.
|
|
|
|
get_filename_component(module_file_path ${CMAKE_CURRENT_LIST_FILE} PATH)
|
|
|
|
# Look for the header file.
|
|
find_path(LEVELDB_INCLUDE NAMES leveldb/db.h PATHS $ENV{LEVELDB_ROOT}/include /opt/local/include /usr/local/include /usr/include DOC "Path in which the file leveldb/db.h is located." )
|
|
mark_as_advanced(LEVELDB_INCLUDE)
|
|
|
|
# Look for the library.
|
|
# Does this work on UNIX systems? (LINUX)
|
|
find_library(LEVELDB_LIBS NAMES leveldb PATHS /usr/lib $ENV{LEVELDB_ROOT}/lib DOC "Path to leveldb library." )
|
|
mark_as_advanced(LEVELDB_LIBS)
|
|
|
|
# Copy the results to the output variables.
|
|
if (LEVELDB_INCLUDE AND LEVELDB_LIBS)
|
|
message(STATUS "Found leveldb in ${LEVELDB_INCLUDE} ${LEVELDB_LIBS}")
|
|
set(LEVELDB_FOUND 1)
|
|
include(CheckCXXSourceCompiles)
|
|
set(CMAKE_REQUIRED_LIBRARY ${LEVELDB_LIBS} pthread)
|
|
set(CMAKE_REQUIRED_INCLUDES ${LEVELDB_INCLUDE})
|
|
else ()
|
|
set(LEVELDB_FOUND 0)
|
|
endif ()
|
|
|
|
# Report the results.
|
|
if (NOT LEVELDB_FOUND)
|
|
set(LEVELDB_DIR_MESSAGE "LEVELDB was not found. Make sure LEVELDB_LIBS and LEVELDB_INCLUDE are set.")
|
|
if (LEVELDB_FIND_REQUIRED)
|
|
message(FATAL_ERROR "${LEVELDB_DIR_MESSAGE}")
|
|
elseif (NOT LEVELDB_FIND_QUIETLY)
|
|
message(STATUS "${LEVELDB_DIR_MESSAGE}")
|
|
endif ()
|
|
endif ()
|