Add libcap check to CMake

- Moved ``<sys/capability.h>`` include inside `__linux__` guard,
  because all uses are similarly guarded.
- <sys/capability.h> is part of an optional devel package, at least
  in fedora. CMake now explicitly checks that libcap devel files
  are available.
- Added libcap to the list of install packages in .travis.yml, to
  make the dependency explicit. travis-ci installs the package by
  default, which is why this hasn't surfaced previously.
This commit is contained in:
JerziKaminsky 2017-04-06 02:42:25 +03:00 committed by Jerzi Kaminsky
parent 270e01ce6d
commit aa6bd85da1
4 changed files with 59 additions and 1 deletions

View file

@ -11,8 +11,8 @@
#include <signal.h>
#include <unistd.h>
#include <getopt.h>
#include <sys/capability.h>
#ifdef __linux__
#include <sys/capability.h>
#include <sys/prctl.h>
#endif
#include "sway/extensions.h"