CMake не может найти libevent на macOS - PullRequest
0 голосов
/ 03 июня 2019

Я установил libevent на macOS -

$ brew install libevent

Я пытаюсь импортировать его в свой CMakeLists.txt -

cmake_minimum_required(VERSION 3.14)
project(xyz)
set(CMAKE_CXX_STANDARD 17)
find_package(libevent REQUIRED)

Я получаю следующую ошибку CMake -

CMake Error at CMakeLists.txt:6 (find_package):
  By not providing "Findlibevent.cmake" in CMAKE_MODULE_PATH this project has
  asked CMake to find a package configuration file provided by "libevent",
  but CMake did not find one.

  Could not find a package configuration file provided by "libevent" with any
  of the following names:

    libeventConfig.cmake
    libevent-config.cmake

  Add the installation prefix of "libevent" to CMAKE_PREFIX_PATH or set
  "libevent_DIR" to a directory containing one of the above files.  If
  "libevent" provides a separate development package or SDK, be sure it has
  been installed.

Может кто-нибудь подсказать, как импортировать libevent установленный в системе в CMake?

...