History log of /libevent-2.1.12/cmake/AddEventLibrary.cmake (Results 1 – 11 of 11)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
Revision tags: release-2.2.1-alpha, release-2.1.12-stable
# 813cc739 20-Jan-2020 yuangongji <[email protected]>

cmake: set rpath for libraries on linux

(cherry picked from commit ce8be2385b5fee16859a630fca0c98ad290c8e21)


# 47eb8c12 30-Nov-2019 Azat Khuzhin <[email protected]>

cmake: use CMAKE_LIBRARY_OUTPUT_DIRECTORY for the final shared library symlink

Fixes: 669a53f3 ("cmake: set library names to be the same as with autotools")
(cherry picked from commit b9f442e2d7af8b

cmake: use CMAKE_LIBRARY_OUTPUT_DIRECTORY for the final shared library symlink

Fixes: 669a53f3 ("cmake: set library names to be the same as with autotools")
(cherry picked from commit b9f442e2d7af8b01cd34f75f2f404763b76d42dc)

show more ...


# 1c047618 07-Nov-2019 yuangongji <[email protected]>

cmake: improve package config file

(cherry picked from commit dc4be869d5009f38e0ef02ff07dd799f9c2fef2f)


# a9d1121d 25-Oct-2019 yuangongji <[email protected]>

cmake: eliminate duplicate installation of public headers

(cherry picked from commit 5fe83d7433022e29a401753f64ec78faaf25e0a7)


Revision tags: release-2.1.11-stable
# 596855f7 11-Jul-2019 Azat Khuzhin <[email protected]>

cmake: install shared library only if it was requested

$ cmake -DEVENT__LIBRARY_TYPE=static ..
...
CMake Error:
Error evaluating generator expression:

$<TARGET_FILE_DIR:event_core_share

cmake: install shared library only if it was requested

$ cmake -DEVENT__LIBRARY_TYPE=static ..
...
CMake Error:
Error evaluating generator expression:

$<TARGET_FILE_DIR:event_core_shared>

No target "event_core_shared"

Fixes: #853
Fixes: 669a53f3 ("cmake: set library names to be the same as with autotools")
(cherry picked from commit 55d1e20e1a5dbd1188f4143968f7cafee33edc0d)

show more ...


# 305251b9 09-Jul-2019 yuangongji <[email protected]>

cmake: set library names to be the same as with autotools

libtool has VERSION_INFO [1], cmake has SOVERSION/VERSION instead
(although it has different format). Also libtool has RELEASE [2] while
cma

cmake: set library names to be the same as with autotools

libtool has VERSION_INFO [1], cmake has SOVERSION/VERSION instead
(although it has different format). Also libtool has RELEASE [2] while
cmake do not have analog yet [3], hence manual symlinks should be
created.

[1]: https://www.gnu.org/software/libtool/manual/html_node/Libtool-versioning.html
[2]: https://www.gnu.org/software/libtool/manual/html_node/Release-numbers.html
[3]: https://gitlab.kitware.com/cmake/cmake/issues/17652

Plus osx has compatibility_version/current_version dylib properties and
cmake do not have separate properties for them [4], hence manual LINK_FLAGS.
And also there INSTALL_NAME_DIR property which should be adjusted too.

[4]: https://public.kitware.com/Bug/view.php?id=4383

So after all changes, here is an example before/after for osx and linux:

# osx
# autotools
.libs/libevent_pthreads-2.2.1.dylib
.libs/libevent_pthreads.dylib -> libevent_pthreads-2.2.1.dylib
/usr/local/lib/libevent_pthreads-2.2.1.dylib (compatibility version 2.0.0, current version 2.0.0)
# cmake
# before patch
lib/libevent_pthreads.2.2.0.dylib
lib/libevent_pthreads.dylib -> libevent_pthreads.2.2.0.dylib
@rpath/libevent_pthreads.2.2.0.dylib (compatibility version 2.2.0, current version 0.0.0)
# after patch
lib/libevent_pthreads-2.2.1.dylib
lib/libevent_pthreads.dylib -> libevent_pthreads-2.2.1.dylib
/vagrant/.cmake/inst/lib/libevent_pthreads-2.2.1.dylib (compatibility version 2.0.0, current version 2.0.0)

# linux
# autotools
.libs/libevent_pthreads-2.2.so.1 -> libevent_pthreads-2.2.so.1.0.0
.libs/libevent_pthreads-2.2.so.1.0.0
.libs/libevent_pthreads.so -> libevent_pthreads-2.2.so.1.0.0
# cmake
# before patch
lib/libevent_pthreads.so -> libevent_pthreads.so.2.2.0
lib/libevent_pthreads.so.2.2.0
# after patch
lib/libevent_pthreads-2.2.so -> libevent_pthreads-2.2.so.1
lib/libevent_pthreads-2.2.so.1 -> libevent_pthreads-2.2.so.1.0.0
lib/libevent_pthreads-2.2.so.1.0.0
lib/libevent_pthreads.so -> libevent_pthreads-2.2.so.1.0.0

Closes: #838 (cherry-picked)
Closes: #760
(cherry picked from commit 669a53f341e192657140952cfe025c260da2b1c1)

show more ...


Revision tags: release-2.1.10-stable, release-2.1.9-beta, release-2.0.23-beta
# eb10a738 22-Nov-2018 Azat Khuzhin <[email protected]>

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]: 7182c2f561

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)

(cherry picked from commit c9a073eae8f86a74fbbb125db34b881ef40108b7)

show more ...


# 29590718 05-Apr-2018 Philip Herron <[email protected]>

cmake: ensure windows dll's are installed as well as lib files

Closes: #621
(cherry picked from commit 0fa43c99fbba6f3b1827ada98302f548206a358f)


# 5398cbcd 14-Mar-2017 Azat Khuzhin <[email protected]>

cmake: use APPEND during exporting targets (for old cmake)

On centos with cmake 2.8.12.2:
CMake Error at cmake/AddEventLibrary.cmake:92 (export):
export called with target "event_extra_shared"

cmake: use APPEND during exporting targets (for old cmake)

On centos with cmake 2.8.12.2:
CMake Error at cmake/AddEventLibrary.cmake:92 (export):
export called with target "event_extra_shared" which requires target
"event_core_shared" that is not in the export list.

If the required target is not easy to reference in this call, consider
using the APPEND option with multiple separate calls.

But on newer cmake I guess everything is ok.

Fixes: 7182c2f561570cd9ceb704623ebe9ae3608c7b43 ("cmake: build SHARED
and STATIC libraries (like autoconf does)")

(cherry picked from commit b1e8a4138f0da3c8a4bc303ff72b620b41c066d6)

show more ...


# cc554d87 13-Mar-2017 Azat Khuzhin <[email protected]>

cmake: fix pkgconfig generation (copy-paste typo)

(cherry picked from commit 882f537c409d9c51ede581a3e13de7519227edb7)


# 9806b126 13-Mar-2017 Azat Khuzhin <[email protected]>

Merge branch 'cmake-missing-bits'

This patchset adds next missing things (in compare to autotools):
- pkgconfig
- event_pthreads/event_openssl
- compile shared/static libraries always

And some fixe

Merge branch 'cmake-missing-bits'

This patchset adds next missing things (in compare to autotools):
- pkgconfig
- event_pthreads/event_openssl
- compile shared/static libraries always

And some fixes, because it will not build after fixing other things:
- export missing symbols for cmake (-fvisibility=hidden)

* cmake-missing-bits:
cmake: support visibility for AppleClang too
cmake: fix export absolute path and relative path and cleanup a bit
cmake: generate and install pkgconfig files
cmake: build SHARED and STATIC libraries (like autoconf does)
cmake: add missing event_openssl/event_pthreads libraries
Export symbols for -fvisibility=hidden (under cmake)

Refs: #246
(cherry picked from commit 489991a2b2628ba1ff4e6879b9f67ec35d224c38)

show more ...