2019-06-20 02:58:25 +03:00
|
|
|
# Copyright (c) Facebook, Inc. and its affiliates.
|
2019-03-08 06:29:53 +03:00
|
|
|
#
|
2019-06-20 02:58:25 +03:00
|
|
|
# This software may be used and distributed according to the terms of the
|
|
|
|
# GNU General Public License version 2.
|
2019-03-08 06:29:53 +03:00
|
|
|
|
2018-05-01 00:28:44 +03:00
|
|
|
include(FindPkgConfig)
|
|
|
|
|
2018-10-23 23:39:58 +03:00
|
|
|
set(CMAKE_THREAD_PREFER_PTHREAD ON)
|
|
|
|
set(THREADS_PREFER_PTHREAD_FLAG ON)
|
|
|
|
find_package(Threads REQUIRED)
|
|
|
|
|
2019-03-29 06:53:29 +03:00
|
|
|
find_package(gflags CONFIG REQUIRED)
|
|
|
|
include_directories(${GFLAGS_INCLUDE_DIR})
|
|
|
|
|
2019-01-16 00:32:37 +03:00
|
|
|
find_package(glog CONFIG REQUIRED)
|
2019-03-29 06:53:29 +03:00
|
|
|
include_directories(${GLOG_INCLUDE_DIR})
|
|
|
|
|
|
|
|
# We need to probe for libevent because the current stable version
|
|
|
|
# of libevent doesn't publish the -L libdir in its exported interface
|
|
|
|
# which means that folly simply exports `event` to us, leaving us
|
|
|
|
# unable to resolve and link it. Pulling in the package via its
|
|
|
|
# config causes the event target to be defined and satisfies the
|
|
|
|
# linker.
|
|
|
|
find_package(Libevent CONFIG QUIET)
|
|
|
|
|
2019-05-02 02:05:15 +03:00
|
|
|
find_package(fmt CONFIG REQUIRED)
|
2018-05-01 00:28:44 +03:00
|
|
|
find_package(folly CONFIG REQUIRED)
|
2019-03-29 06:53:29 +03:00
|
|
|
include_directories(${FOLLY_INCLUDE_DIR})
|
|
|
|
|
2019-07-25 07:04:08 +03:00
|
|
|
find_package(fb303 CONFIG REQUIRED)
|
|
|
|
include_directories(${FB303_INCLUDE_DIR})
|
|
|
|
|
2018-10-23 23:39:58 +03:00
|
|
|
find_package(fizz CONFIG REQUIRED)
|
2019-03-29 06:53:29 +03:00
|
|
|
include_directories(${FIZZ_INCLUDE_DIR})
|
|
|
|
|
2018-05-01 00:28:44 +03:00
|
|
|
find_package(wangle CONFIG REQUIRED)
|
2019-03-29 06:53:29 +03:00
|
|
|
include_directories(${WANGLE_INCLUDE_DIR})
|
|
|
|
|
2019-09-20 21:33:28 +03:00
|
|
|
find_package(FBThrift CONFIG REQUIRED COMPONENTS cpp2 py)
|
2019-03-29 06:53:29 +03:00
|
|
|
include_directories(${FBTHRIFT_INCLUDE_DIR})
|
|
|
|
|
2019-02-06 08:49:01 +03:00
|
|
|
find_package(yarpl CONFIG REQUIRED)
|
|
|
|
find_package(rsocket CONFIG REQUIRED)
|
2019-05-04 01:52:39 +03:00
|
|
|
|
2018-05-01 00:28:44 +03:00
|
|
|
find_package(GMock MODULE REQUIRED)
|
2019-03-29 06:53:29 +03:00
|
|
|
include_directories(${GMOCK_INCLUDEDIR} ${LIBGMOCK_INCLUDE_DIR})
|
2019-05-04 01:52:39 +03:00
|
|
|
include(GoogleTest)
|
|
|
|
enable_testing()
|
2019-03-29 06:53:29 +03:00
|
|
|
|
2019-01-18 05:46:04 +03:00
|
|
|
find_package(OpenSSL MODULE REQUIRED)
|
2018-05-01 00:28:44 +03:00
|
|
|
|
|
|
|
find_package(SELinux)
|
2018-07-27 23:10:02 +03:00
|
|
|
set(EDEN_HAVE_SELINUX ${SELINUX_FOUND})
|
2018-05-01 00:28:44 +03:00
|
|
|
|
2019-09-21 04:20:17 +03:00
|
|
|
if("${ENABLE_GIT}" STREQUAL "AUTO")
|
|
|
|
find_package(LibGit2 MODULE)
|
|
|
|
set(EDEN_HAVE_GIT "${LibGit2_FOUND}")
|
|
|
|
elseif(ENABLE_GIT)
|
|
|
|
find_package(LibGit2 MODULE REQUIRED)
|
|
|
|
set(EDEN_HAVE_GIT "${LibGit2_FOUND}")
|
|
|
|
else()
|
|
|
|
set(EDEN_HAVE_GIT OFF)
|
|
|
|
endif()
|
2018-05-01 00:28:44 +03:00
|
|
|
|
2019-11-22 23:53:41 +03:00
|
|
|
find_package(LZ4 MODULE REQUIRED)
|
2019-09-27 06:25:17 +03:00
|
|
|
|
2018-05-01 00:28:44 +03:00
|
|
|
# The following packages ship with their own CMake configuration files
|
|
|
|
find_package(cpptoml CONFIG REQUIRED)
|
|
|
|
find_package(gflags CONFIG REQUIRED)
|
|
|
|
|
|
|
|
# TODO: It shouldn't be too hard to turn RocksDB and sqlite3 into optional
|
|
|
|
# dependencies, since we have alternate LocalStore implementations.
|
|
|
|
find_package(RocksDB CONFIG REQUIRED)
|
2018-07-27 23:10:02 +03:00
|
|
|
set(EDEN_HAVE_ROCKSDB ${RocksDB_FOUND})
|
2018-05-01 00:28:44 +03:00
|
|
|
find_package(Sqlite3 REQUIRED)
|
2018-07-27 23:10:02 +03:00
|
|
|
set(EDEN_HAVE_SQLITE3 ${SQLITE3_FOUND})
|
2018-05-01 00:28:44 +03:00
|
|
|
|
2019-09-20 21:33:28 +03:00
|
|
|
find_package(python-toml REQUIRED)
|
|
|
|
|
2019-03-12 00:20:44 +03:00
|
|
|
find_package(CURL)
|
|
|
|
set(EDEN_HAVE_CURL ${CURL_FOUND})
|
|
|
|
|
2019-06-01 02:11:50 +03:00
|
|
|
if (WIN32)
|
|
|
|
find_package(Prjfs MODULE REQUIRED)
|
|
|
|
endif()
|
2019-10-09 23:00:50 +03:00
|
|
|
|
2019-08-28 03:02:49 +03:00
|
|
|
set(EDEN_HAVE_MONONOKE OFF)
|
2018-10-17 04:39:13 +03:00
|
|
|
|
|
|
|
# TODO(strager): Support systemd in the opensource build.
|
|
|
|
set(EDEN_HAVE_SYSTEMD OFF)
|
2019-06-26 00:12:10 +03:00
|
|
|
|
|
|
|
if (WIN32)
|
|
|
|
set(DEFAULT_ETC_EDEN_DIR "C:/tools/eden/config")
|
|
|
|
else()
|
|
|
|
set(DEFAULT_ETC_EDEN_DIR "/etc/eden")
|
|
|
|
endif()
|
|
|
|
set(
|
|
|
|
ETC_EDEN_DIR "${DEFAULT_ETC_EDEN_DIR}" CACHE STRING
|
|
|
|
"The directory for system-wide EdenFS configuration files."
|
|
|
|
)
|