Skip to content

Commit

Permalink
[libevent] add features (#8349)
Browse files Browse the repository at this point in the history
* [libevent] add features

* Update version

* Add libevent[openssl] dependent for evpp

* Update CONTROL file
  • Loading branch information
NancyLi1013 authored and ras0219-msft committed Nov 19, 2019
1 parent ff6a725 commit 058f6e2
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 4 deletions.
4 changes: 2 additions & 2 deletions 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)
9 changes: 8 additions & 1 deletion 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
8 changes: 7 additions & 1 deletion ports/libevent/portfile.cmake
Expand Up @@ -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()
Expand All @@ -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}
Expand Down

0 comments on commit 058f6e2

Please sign in to comment.