libevhtp
libevhtp copied to clipboard
libevhtp-1.2.18 doesn't build against libevent 2.1.8-stable
Details
Building on Ubuntu 16.04.
The problem seems to be that libevent creates its configuration files with name prefix "Libevent" (like LibeventConfig.cmake), but evhtp uses "find_package(LibEvent REQUIRED)" here https://github.com/criticalstack/libevhtp/blob/1.2.18/CMakeLists.txt#L57.
It should be "find_package(Libevent REQUIRED)". Note the lower-case 'e'.
Steps or code to reproduce the problem.
- Get libevent https://github.com/libevent/libevent/archive/release-2.1.8-stable.tar.gz
- mkdir build && cd build && cmake -DCMAKE_INSTALL_PREFIX=/tmp/libevent_install .. && make install
- Get libevhtp 1.2.18
- cd build && cmake -DLibevent_DIR=/tmp/libevent_install/lib/cmake/libevent ..
cmake will fail saying it can't find LIBEVENT_INCLUDE_DIR and other libevent artifacts.
- edit CMakeLists.txt to have "find_package(Libevent REQUIRED)"
- cd build && cmake -DLibevent_DIR=/tmp/libevent_install/lib/cmake/libevent .. && make
Builds correctly...
Version
1.2.18
There is also another LibEvent that needs to be changed to Libevent in CMakeLists.txt. Here: https://github.com/criticalstack/libevhtp/blob/1.2.18/CMakeLists.txt#L60