Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge #200: cmake: Improve handling
libevent
dependency
b18b727 FIXUP: Switch from `AddLibeventIfNeeded` to `FindLibevent` (Hennadii Stepanov) 2ff3c2d cmake: Add `FindLibevent` module (Hennadii Stepanov) b568933 FIXUP: Request libevent only when needed (Hennadii Stepanov) Pull request description: The first commit resolves this comment https://github.com/hebasto/bitcoin/blob/05784622feb15252a75dad64cdd5723e612e3f14/cmake/module/AddLibeventIfNeeded.cmake#L31-L33 --- The rest of the PR switches from the `AddLibeventIfNeeded` module to a more "standard" `FindLibevent` one. Here are the relevant excerpts from configuration logs: 1. On Linux, no depends: - staging branch: ``` -- Checking for module 'libevent>=2.1.8' -- Found libevent, version 2.1.12-stable -- Performing Test HAVE_EVHTTP_CONNECTION_GET_PEER_CONST_CHAR -- Performing Test HAVE_EVHTTP_CONNECTION_GET_PEER_CONST_CHAR - Failed -- Checking for module 'libevent_pthreads>=2.1.8' -- Found libevent_pthreads, version 2.1.12-stable ``` - this PR: ``` -- Found Libevent: /usr/lib/x86_64-linux-gnu (found suitable version "2.1.12-stable", minimum required is "2.1.8") -- Performing Test HAVE_EVHTTP_CONNECTION_GET_PEER_CONST_CHAR -- Performing Test HAVE_EVHTTP_CONNECTION_GET_PEER_CONST_CHAR - Failed ``` 2. On Linux, with depends: - staging branch: ``` -- Checking for module 'libevent>=2.1.8' -- Found libevent, version 2.1.12-stable -- Performing Test HAVE_EVHTTP_CONNECTION_GET_PEER_CONST_CHAR -- Performing Test HAVE_EVHTTP_CONNECTION_GET_PEER_CONST_CHAR - Failed -- Checking for module 'libevent_pthreads>=2.1.8' -- Found libevent_pthreads, version 2.1.12-stable ``` - this PR: ``` -- Found Libevent: /home/hebasto/git/bitcoin/depends/x86_64-pc-linux-gnu/lib (found suitable version "2.1.12-stable", minimum required is "2.1.8") -- Performing Test HAVE_EVHTTP_CONNECTION_GET_PEER_CONST_CHAR -- Performing Test HAVE_EVHTTP_CONNECTION_GET_PEER_CONST_CHAR - Failed ``` 3. On Windows, MSVC + vcpkg: - staging branch: ``` -- Found libevent include directory: C:/Users/hebasto/source/repos/bitcoin/build/vcpkg_installed/x64-windows/include -- Found libevent component: C:/Users/hebasto/source/repos/bitcoin/build/vcpkg_installed/x64-windows/debug/bin/event_extra.dll -- Found libevent 2.1.12 in C:/Users/hebasto/source/repos/bitcoin/build/vcpkg_installed/x64-windows -- Performing Test HAVE_EVHTTP_CONNECTION_GET_PEER_CONST_CHAR -- Performing Test HAVE_EVHTTP_CONNECTION_GET_PEER_CONST_CHAR - Failed ``` - this PR: ``` -- Found Libevent: C:/Users/hebasto/source/repos/bitcoin/build/vcpkg_installed/x64-windows/share/libevent (found suitable version "2.1.12", minimum required is "2.1.8") -- Performing Test HAVE_EVHTTP_CONNECTION_GET_PEER_CONST_CHAR -- Performing Test HAVE_EVHTTP_CONNECTION_GET_PEER_CONST_CHAR - Failed ``` ACKs for top commit: pablomartin4btc: tACK b18b727 Tree-SHA512: ee4a4d31f18bc60280fbd49d082e3802919de0b21f938baaee57b22dec5e9df3c8da23b519d57376d8108c34470f131018aa7a0627f674a27b237d1dff954c7e
- Loading branch information