libevent/2.1.12

libevent - an event notification library
Recipe info
2023-04-25

Available packages
Linux
Windows
macOS
macOS Apple Silicon

Install
Add the following line to your conanfile.txt:
[requires]
libevent/2.1.12

Using libevent

Note

If you are new with Conan, we recommend to read the section how to consume packages.

If you need additional assistance, please ask a question in the Conan Center Index repository.

Simplest use case consuming this recipe and assuming CMake as your local build tool:

[requires]
libevent/2.1.12
[generators]
CMakeDeps
CMakeToolchain
[layout]
cmake_layout
from conan import ConanFile
from conan.tools.cmake import cmake_layout


class ExampleRecipe(ConanFile):
    settings = "os", "compiler", "build_type", "arch"
    generators = "CMakeDeps", "CMakeToolchain"

    def requirements(self):
        self.requires("libevent/2.1.12")

    def layout(self):
        cmake_layout(self)

Now, you can run this Conan command to locally install (and build if necessary) this recipe and its dependencies (if any):

$ conan install conanfile.txt --build=missing

Useful information to take into account to consume this library:


These are the main declared targets:

  • CMake package name(s): Libevent
  • CMake target name(s): libevent::libevent
  • core => libevent::core
    extra => libevent::extra
    openssl => libevent::openssl
    pthreads => libevent::pthreads
    
  • pkg-config file name(s): libevent.pc
  • core => libevent_core.pc
    extra => libevent_extra.pc
    openssl => libevent_openssl.pc
    pthreads => libevent_pthreads.pc
    

A simple use case using the CMake file name and the global target:

# ...
find_package(Libevent REQUIRED)
# ...
target_link_libraries(YOUR_TARGET libevent::libevent)

These are all the available headers. Some of these ones might be non-public; make sure of it by visiting the libevent homepage listed above:

#include "evdns.h"
#include "event.h"
#include "event2/buffer.h"
#include "event2/buffer_compat.h"
#include "event2/bufferevent.h"
#include "event2/bufferevent_compat.h"
#include "event2/bufferevent_ssl.h"
#include "event2/bufferevent_struct.h"
#include "event2/dns.h"
#include "event2/dns_compat.h"
#include "event2/dns_struct.h"
#include "event2/event-config.h"
#include "event2/event.h"
#include "event2/event_compat.h"
#include "event2/event_struct.h"
#include "event2/http.h"
#include "event2/http_compat.h"
#include "event2/http_struct.h"
#include "event2/keyvalq_struct.h"
#include "event2/listener.h"
#include "event2/rpc.h"
#include "event2/rpc_compat.h"
#include "event2/rpc_struct.h"
#include "event2/tag.h"
#include "event2/tag_compat.h"
#include "event2/thread.h"
#include "event2/util.h"
#include "event2/visibility.h"
#include "evhttp.h"
#include "evrpc.h"
#include "evutil.h"