2017-04-03 20:54:11 +08:00
|
|
|
include(vcpkg_common_functions)
|
2017-07-14 06:52:03 +08:00
|
|
|
|
2017-07-21 10:18:00 +08:00
|
|
|
if(VCPKG_CMAKE_SYSTEM_NAME MATCHES "WindowsStore")
|
|
|
|
message(FATAL_ERROR "libevent does not currently support UWP")
|
|
|
|
endif()
|
|
|
|
|
2017-07-14 06:52:03 +08:00
|
|
|
vcpkg_from_github(
|
|
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
|
|
REPO libevent/libevent
|
|
|
|
REF release-2.1.8-stable
|
2017-04-03 20:54:11 +08:00
|
|
|
SHA512 0d5c872dc797b69ab8ea4b83aebcbac20735b8c6f5adfcc2950aa4d6013d240f5fac3376e817da75ae0ccead50cec0d931619e135a050add438777457b086549
|
2018-02-10 22:49:27 +08:00
|
|
|
PATCHES
|
2019-03-01 15:53:42 +08:00
|
|
|
"fix-target-files.patch"
|
2018-02-10 22:49:27 +08:00
|
|
|
)
|
|
|
|
|
2017-04-03 20:54:11 +08:00
|
|
|
vcpkg_configure_cmake(
|
|
|
|
SOURCE_PATH ${SOURCE_PATH}
|
2018-02-10 22:49:27 +08:00
|
|
|
PREFER_NINJA
|
|
|
|
OPTIONS
|
2018-05-19 01:57:31 +08:00
|
|
|
-DEVENT_INSTALL_CMAKE_DIR:PATH=share/libevent
|
2018-02-10 22:49:27 +08:00
|
|
|
-DEVENT__DISABLE_BENCHMARK=ON
|
|
|
|
-DEVENT__DISABLE_TESTS=ON
|
|
|
|
-DEVENT__DISABLE_REGRESS=ON
|
|
|
|
-DEVENT__DISABLE_SAMPLES=ON
|
2017-04-03 20:54:11 +08:00
|
|
|
)
|
|
|
|
|
|
|
|
vcpkg_install_cmake()
|
|
|
|
|
|
|
|
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
|
2017-04-06 07:56:53 +08:00
|
|
|
|
2018-05-19 01:57:31 +08:00
|
|
|
vcpkg_fixup_cmake_targets()
|
2017-07-14 06:52:03 +08:00
|
|
|
vcpkg_copy_pdbs()
|
2017-04-06 07:56:53 +08:00
|
|
|
|
2017-07-14 06:52:03 +08:00
|
|
|
file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/libevent)
|
2017-04-03 20:54:11 +08:00
|
|
|
file(RENAME ${CURRENT_PACKAGES_DIR}/share/libevent/LICENSE ${CURRENT_PACKAGES_DIR}/share/libevent/copyright)
|