2 <img src="https://strcpy.net/libevent3.png" alt="libevent logo"/>
7 [![Appveyor Win32 Build Status](https://ci.appveyor.com/api/projects/status/github/libevent/libevent?branch=master&svg=true)](https://ci.appveyor.com/project/nmathewson/libevent)
8 [![Travis Build Status](https://travis-ci.org/libevent/libevent.svg?branch=master)](https://travis-ci.org/libevent/libevent)
12 # 0. BUILDING AND INSTALLATION (Briefly)
18 $ make verify # (optional)
24 The following Libevent specific Cmake variables ar as follows (the values being
28 # Installation directory for executables
29 EVENT_INSTALL_BIN_DIR:PATH=bin
31 # Installation directory for CMake files
32 EVENT_INSTALL_CMAKE_DIR:PATH=lib/cmake/libevent
34 ## Installation directory for header files
35 EVENT_INSTALL_INCLUDE_DIR:PATH=include
37 ## Installation directory for libraries
38 EVENT_INSTALL_LIB_DIR:PATH=lib
40 ## Define if libevent should be built with shared libraries instead of archives
41 EVENT__BUILD_SHARED_LIBRARIES:BOOL=OFF
43 # Enable running gcov to get a test coverage report (only works with
44 # GCC/CLang). Make sure to enable -DCMAKE_BUILD_TYPE=Debug as well.
45 EVENT__COVERAGE:BOOL=OFF
47 # Defines if libevent should build without the benchmark exectuables
48 EVENT__DISABLE_BENCHMARK:BOOL=OFF
50 # Define if libevent should build without support for a debug mode
51 EVENT__DISABLE_DEBUG_MODE:BOOL=OFF
53 # Define if libevent should not allow replacing the mm functions
54 EVENT__DISABLE_MM_REPLACEMENT:BOOL=OFF
56 # Define if libevent should build without support for OpenSSL encrpytion
57 EVENT__DISABLE_OPENSSL:BOOL=ON
59 # Disable the regress tests
60 EVENT__DISABLE_REGRESS:BOOL=OFF
62 # Disable sample files
63 EVENT__DISABLE_SAMPLES:BOOL=OFF
65 # If tests should be compiled or not
66 EVENT__DISABLE_TESTS:BOOL=OFF
68 # Define if libevent should not be compiled with thread support
69 EVENT__DISABLE_THREAD_SUPPORT:BOOL=OFF
71 # Enables verbose debugging
72 EVENT__ENABLE_VERBOSE_DEBUG:BOOL=OFF
74 # When crosscompiling forces running a test program that verifies that Kqueue
75 # works with pipes. Note that this requires you to manually run the test program
76 # on the the cross compilation target to verify that it works. See cmake
77 # documentation for try_run for more details
78 EVENT__FORCE_KQUEUE_CHECK:BOOL=OFF
80 # set EVENT_STAGE_VERSION
81 EVENT__STAGE_VERSION:STRING=beta
84 __More variables can be found by running `cmake -LAH <sourcedir_path>`__
89 Install CMake: <http://www.cmake.org>
92 $ md build && cd build
93 $ cmake -G "Visual Studio 10" .. # Or whatever generator you want to use cmake --help for a list.
98 $ mkdir build && cd build
99 $ cmake .. # Default to Unix Makefiles.
101 $ make verify # (optional)
104 # 1. BUILDING AND INSTALLATION (In Depth)
108 To build libevent, type
110 $ ./configure && make
113 (If you got libevent from the git repository, you will
114 first need to run the included "autogen.sh" script in order to
115 generate the configure script.)
117 You can run the regression tests by running
125 Before reporting any problems, please run the regression tests.
127 To enable the low-level tracing build the library as:
129 $ CFLAGS=-DUSE_DEBUG ./configure [...]
131 Standard configure flags should work. In particular, see:
133 --disable-shared Only build static libraries
134 --prefix Install all files relative to this directory.
137 The configure script also supports the following flags:
139 --enable-gcc-warnings Enable extra compiler checking with GCC.
140 --disable-malloc-replacement
141 Don't let applications replace our memory
143 --disable-openssl Disable support for OpenSSL encryption.
144 --disable-thread-support Don't support multithreaded environments.
148 (Note that autoconf is currently the most mature and supported build
149 enviroment for libevent; the cmake instructions here are new and
150 experimental, though they _should_ be solid. We hope that cmake will
151 still be supported in future versions of Libevent, and will try to
152 make sure that happens.)
154 First of all install <http://www.cmake.org>.
156 To build libevent using Microsoft Visual studio open the "Visual Studio Command prompt" and type:
159 $ cd <libevent source dir>
160 $ mkdir build && cd build
161 $ cmake -G "Visual Studio 10" .. # Or whatever generator you want to use cmake --help for a list.
165 In the above, the ".." refers to the dir containing the Libevent source code.
166 You can build multiple versions (with different compile time settings) from the same source tree
167 by creating other build directories.
169 It is highly recommended to build "out of source" when using
170 CMake instead of "in source" like the normal behaviour of autoconf for this reason.
172 The "NMake Makefiles" CMake generator can be used to build entirely via the command line.
174 To get a list of settings available for the project you can type:
182 CMake also provides a GUI that lets you specify the source directory and output (binary) directory
183 that the build should be placed in.
187 To build Libevent with OpenSSL support you will need to have OpenSSL binaries available when building,
188 these can be found here: <http://www.openssl.org/related/binaries.html>
192 For the latest released version of Libevent, see the official website at
193 <http://libevent.org/> .
195 There's a pretty good work-in-progress manual up at
196 <http://www.wangafu.net/~nickm/libevent-book/> .
198 For the latest development versions of Libevent, access our Git repository
202 $ git clone git://levent.git.sourceforge.net/gitroot/levent/libevent
205 You can browse the git repository online at:
207 <http://levent.git.sourceforge.net/git/gitweb-index.cgi>
209 <https://github.com/libevent/Libevent>
211 To report bugs, request features, or submit patches to Libevent,
212 use the Sourceforge trackers at
214 <https://sourceforge.net/tracker/?group_id=50884>
216 There's also a libevent-users mailing list for talking about Libevent
219 <http://archives.seul.org/libevent/users/>
223 The following people have helped with suggestions, ideas, code or
230 * Weston Andros Adamson
263 * Juan Pablo Fernandez
268 * Alexander von Gernler
314 * Mitchell Livingston
339 * Tassilo von Parseval
370 * Joseph Spadavecchia
380 * Constantine Verutin
395 If we have forgotten your name, please contact us.