|
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
|
|
66861f88
|
2022-03-10T23:58:36
|
|
Require libevent_core not libevent for pkg-config
libevent library itself had been deprecated long time ago.
Fixes: #1213
|
|
d70af27d
|
2012-11-16T10:48:13
|
|
Use correct openssl libs and includes in pkgconfig file
Previously we were saying -lssl -lcrypto unconditionally when
we should have been saying OPENSSL_LIBS.
Based on a patch from Patrick Pelletier
|
|
274dd036
|
2011-05-04T16:34:28
|
|
libssl depends on libcrypto, not the other way around.
|
|
ebcb1f03
|
2010-08-10T11:11:25
|
|
Add pkgconfig files for libevent_{openssl,pthreads}
|