[libevent] add features (#8349)

* [libevent] add features

* Update version

* Add libevent[openssl] dependent for evpp

* Update CONTROL file
This commit is contained in:
NancyLi1013 2019-11-19 11:42:34 -08:00 committed by Robert Schumacher
parent ff6a725392
commit 058f6e2a35
3 changed files with 17 additions and 4 deletions

View File

@ -1,5 +1,5 @@
Source: evpp
Version: 0.7.0-1
Version: 0.7.0-2
Homepage: https://github.com/Qihoo360/evpp
Description: A modern C++ network library based on libevent for developing high performance network services in TCP/UDP/HTTP protocols.
Build-Depends: glog, libevent, rapidjson, concurrentqueue (!windows), boost-lockfree (!windows)
Build-Depends: glog, libevent (windows), libevent[openssl] (!windows), rapidjson, concurrentqueue (!windows), boost-lockfree (!windows)

View File

@ -1,5 +1,12 @@
Source: libevent
Version: 2.1.11
Version: 2.1.11-1
Build-Depends: openssl
Homepage: https://github.com/libevent/libevent
Description: An event notification library
Feature: openssl
Description: Support for openssl
Build-Depends: openssl
Feature: thread
Description: Support for thread

View File

@ -14,6 +14,12 @@ vcpkg_from_github(
fix-crt_linkage.patch
)
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
INVERTED_FEATURES
openssl EVENT__DISABLE_OPENSSL
thread EVENT__DISABLE_THREAD_SUPPORT
)
if (VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic")
set(LIBEVENT_LIB_TYPE SHARED)
else()
@ -23,7 +29,7 @@ endif()
vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
PREFER_NINJA
OPTIONS
OPTIONS ${FEATURE_OPTIONS}
-DEVENT_INSTALL_CMAKE_DIR:PATH=share/libevent
-DEVENT__LIBRARY_TYPE=${LIBEVENT_LIB_TYPE}
-DVCPKG_CRT_LINKAGE=${VCPKG_CRT_LINKAGE}