sapling/CMake/EdenConfigChecks.cmake
Jun Wu fae2056037 do not require SELinux in GitHub build
Summary:
I tried to build eden using GitHub version and ran into SELinux issues.
This patch fixed related issues, namely:

- `set(X Y)` sets X to string literal Y. Change it to `set(X ${Y})`.
- `SELINUX_INCLUDE_DIR` could be undefined. Check before use it.
- `./eden/fs/eden-config.h` and `./build/eden/fs/eden-config.h` both exist and
  the former is used. Set include dirs so the latter gets used.

Reviewed By: bolinfest

Differential Revision: D9029272

fbshipit-source-id: 0c94bbe2f9e3fa90973802ddde16ad4d9ddfc0e8
2018-07-27 13:22:57 -07:00

28 lines
847 B
CMake

include(FindPkgConfig)
find_package(folly CONFIG REQUIRED)
find_package(wangle CONFIG REQUIRED)
find_package(FBThrift CONFIG REQUIRED)
find_package(GMock MODULE REQUIRED)
find_package(SELinux)
set(EDEN_HAVE_SELINUX ${SELINUX_FOUND})
find_package(LibGit2 REQUIRED)
# 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)
set(EDEN_HAVE_ROCKSDB ${RocksDB_FOUND})
find_package(Sqlite3 REQUIRED)
set(EDEN_HAVE_SQLITE3 ${SQLITE3_FOUND})
find_package(cpptoml REQUIRED)
# We currently do not have treemanifest support in the opensource build
set(EDEN_HAVE_HG_TREEMANIFEST OFF)