cmake/LibeventConfig.cmake.in


Log

Author Commit Date CI Message
Cœur eec47a67 2024-04-30T15:59:58 Fix typos (#1634)
kurtlau b698e6c4 2024-01-23T04:29:04 Make MbedTLS and OpenSSL dependencies configurable (#1544) As acfac7a#r124469888 mentioned, LibeventConfig.cmake is looking for MBedTLS package, even if libevent is not configured to use MBedTLS. This PR makes MbedTLS and OpenSSL dependencies configurable. Fixes: #1543
Ingo Bauersachs acfac7ae 2022-12-01T18:39:52 Make dependency paths relocatable The generated configurations for both CMake and pkg-config included absolute paths to dependencies (OpenSSL, MbedTLS). This is contrary to the general CMake advise to create relocatable packages [1]. Additionally, when building both mbedtls and libevent via CMake's FetchContent in the same project, loading the project would fail with INTERFACE_INCLUDE_DIRECTORIES property contains path: "/home/user/project/cmake-build/_deps/mbedtls-build/include" which is prefixed in the source directory. The required changes include: - Adding the outer includes only to the BUILD_INTERFACE solves the makes the CMake paths relocatable and thus solves the FetchContent problem. - Updates to libevent_*.pc.in fixes the relocatable issues for pkg-config and properly declares currently missing dependencies. - Using components for linking to OpenSSL (requiring CMake 3.4) and MbedTLS. The new MbedTLS target names now match the component names of the MbedTLS' CMake project. - Use the Threads CMake library reference instead of a direct reference to support both built-in pthread and -lpthread. v2 (azat): get back CMAKE_REQUIRED_LIBRARIES [1] https://cmake.org/cmake/help/v3.25/manual/cmake-packages.7.html#creating-relocatable-packages
Tobias Mayer 16be768d 2023-01-15T07:49:19 Make sure exported include dirs are correct CMake config files don't need any logic to detect the location of installed headers or DSOs, because these locations are already determined at project configuration time. They also don't need to distinguish between build and install trees, because that is already handled by the generated `LibeventTargets-*.cmake` files.
Jonathan Ringer 1f1593ff 2021-10-27T16:40:10 Use GNUInstallDirs for mapping installation directories
Haowei Hsu 80c1e0b7 2022-07-29T20:58:27 Search library name of Debug for find_event_lib.
yuangongji 86eafc03 2020-05-01T09:51:29 cmake: set a default value for LIBEVENT_STATIC_LINK
Mario Emmenlauer 1675a556 2020-03-03T19:02:24 LibeventConfig.cmake: restore CMAKE_FIND_LIBRARY_SUFFIXES and LIBEVENT_STATIC_LINK default The current cmake/LibeventConfig.cmake.in has a few problems and I'm not sure how cleanly developed it is. It seems rater complex for the little things I would assume it needs to do. I found two problems that are fixed in this PR: - If the downstream user does not explicitly set LIBEVENT_STATIC_LINK before calling find_package(libevent) then they will not be able to detect the static library, even if its the only one that exists. Since this may be rather strict, I've changed the behavior so that LIBEVENT_STATIC_LINK can be set to ON or OFF, but if unset, it defaults to whatever configuration libevent was built as. - The other problem is a bug. The package configuration needs to unset CMAKE_FIND_LIBRARY_SUFFIXES after use, otherwise all packages that are detected after libevent will be "infected" by this setting. This was a significant problem for us, and is very hard to detect in downstream project, because the order of dependencies will lead to different search results.
yuangongji dc4be869 2019-11-07T18:26:47 cmake: improve package config file
Azat Khuzhin 7182c2f5 2017-03-12T23:31:59 cmake: build SHARED and STATIC libraries (like autoconf does) Since they are useful for debugging, and if autotools build them then cmamke has to do this too, to make migration more simple. And now: - tests: uses shared libraries (since this is upstreams one) - other binaries: uses static libraries This removes next private config: - EVENT__NEED_DLLIMPORT
Azat Khuzhin 72ef9d16 2016-11-07T00:46:45 cmake: add missing event_openssl/event_pthreads libraries This will remove openssl requirement if you don't use it (i.e. if you not link with openssl_pthreads). Plus it fixes some linking dependencies: - libm required only for test-ratelim And fix some coding style alignment issues. Refs: #246
Sergey Nikulov 27bd9faf 2014-09-02T18:25:52 updates in cmake build
Joakim Söderberg 2b41bcf8 2014-03-07T18:09:56 Export event_extra not event_extras.
Joakim Soderberg f3446ed5 2014-01-09T13:44:38 Add CMake config and install targets. Make it easier for other projects to do find_package by creating config files both in the build and install tree.