From 058f6e2a35e76ee19fc1d448503efe8a7b8c041f Mon Sep 17 00:00:00 2001 From: NancyLi1013 <46708020+NancyLi1013@users.noreply.github.com> Date: Tue, 19 Nov 2019 11:42:34 -0800 Subject: [libevent] add features (#8349) * [libevent] add features * Update version * Add libevent[openssl] dependent for evpp * Update CONTROL file --- ports/evpp/CONTROL | 4 ++-- ports/libevent/CONTROL | 9 ++++++++- ports/libevent/portfile.cmake | 8 +++++++- 3 files changed, 17 insertions(+), 4 deletions(-) diff --git a/ports/evpp/CONTROL b/ports/evpp/CONTROL index b9ec8d278..5f367929a 100644 --- a/ports/evpp/CONTROL +++ b/ports/evpp/CONTROL @@ -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) \ No newline at end of file diff --git a/ports/libevent/CONTROL b/ports/libevent/CONTROL index a05a77edd..59ee136dd 100644 --- a/ports/libevent/CONTROL +++ b/ports/libevent/CONTROL @@ -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 \ No newline at end of file diff --git a/ports/libevent/portfile.cmake b/ports/libevent/portfile.cmake index 1ce0ab450..e04e5f58d 100644 --- a/ports/libevent/portfile.cmake +++ b/ports/libevent/portfile.cmake @@ -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} -- cgit v1.2.3