diff options
author | Azat Khuzhin <a3at.mail@gmail.com> | 2018-11-22 23:00:11 +0300 |
---|---|---|
committer | Azat Khuzhin <a3at.mail@gmail.com> | 2018-11-23 00:02:18 +0300 |
commit | c9a073eae8f86a74fbbb125db34b881ef40108b7 (patch) | |
tree | 3178bd86471372a9272e73e7cd71b706b69ef9d7 /README.md | |
parent | d705e8c0e924d3b815697a075c27a36298f04078 (diff) | |
download | libevent-c9a073eae8f86a74fbbb125db34b881ef40108b7.tar.gz |
cmake: introduce EVENT__LIBRARY_TYPE option
Long time ago in [1] cmake build was forced to compile both libraries
(SHARED and STATIC), since this is how our autotools build works.
[1]: 7182c2f561570cd9ceb704623ebe9ae3608c7b43 ("cmake: build SHARED and STATIC libraries (like autoconf does)")
And there is no way to configure this (and indeed you need to do this
for MSVC for example), so let's introduce option for this --
EVENT__LIBRARY_TYPE.
Plus now we have INTERFACE libraries, that we can use internally in
libevent's cmake rules to avoid strict to _shared/_static variant of the
libraries to link with samples/tests (we prefer SHARED over STATIC for
linking).
Also bump minimal cmake required version to 3.1 by the following
reasons:
- 3.1 is required for RPATH configuration under APPLE
- 3.0 is required for add_library(INTERFACE) (did not found it in 2.8.x
documentation)
- remove extra conditions
(anyway 3.1 was release 4 years ago, so I guess that most of the systems
will have it)
Diffstat (limited to 'README.md')
-rw-r--r-- | README.md | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -27,6 +27,10 @@ The following Libevent specific CMake variables are as follows (the values being the default). ``` +# Type of the library to build (SHARED or STATIC) +# Default is to build BOTH +EVENT__LIBRARY_TYPE:STRING=DEFAULT + # Installation directory for CMake files EVENT_INSTALL_CMAKE_DIR:PATH=lib/cmake/libevent |