vcpkg/ports/libevent/portfile.cmake
Victor Romero 8641dfd9dd
Modify vcpkg_fixup_cmake_targets() (#5459)
* some libraries export <PackageName>LibraryDepends.cmake
instead of <PackageName>Targets.cmake.
Those file also need the fix of #1044

should close #4753

* prefered the general solution #4622.
hopefully solved the issue within #4150
replaced the regex with something more readable
(also ident is lost)

should close:
#4753
#4633
#4150
and maybe more

* Hash vcpkg_fixup_cmake_targets.cmake

* [boost] Fix use of find_package(Boost) with cache variables
[socket-io-client] Fix install

* reversed change back to use regex replace

* [glbinding] Fix _IMPORT_PREFIX depth in *-export.cmake files

* [tinyspline] Ignore warnings treated as errors

* [libevent, liblemon, libpng, smpeg2, zlib] Fix apply patches

* [libsodium] Fix apply patches

* [folly] Link correct libraries in debug and release

* [vtk] Remove unset of _IMPORT_PREFIX

* [tinyspline] Do not treat warnings as errors

* [smpeg2] Fix double* to int comparison

* [nvtt] Define value for HAVE_UNISTD_H in MacOS

* [libui] Fix MacOS X build

* [zlib] Fix download URL

* [qhull] Update to v7.2.1

* [podofo] Set value for HAVE_UNISTD_H in MacOS

* [mongo-cxx-driver,ogre,podofo,qhull] Bump CONTROL version

* [mongo-c-driver] Set _IMPORT_PREFIX

* [tmxparser] Bump CONTROL version

* [qhull,vxl] Bump CONTROL version
2019-02-28 23:53:42 -08:00

36 lines
1.0 KiB
CMake

include(vcpkg_common_functions)
if(VCPKG_CMAKE_SYSTEM_NAME MATCHES "WindowsStore")
message(FATAL_ERROR "libevent does not currently support UWP")
endif()
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO libevent/libevent
REF release-2.1.8-stable
SHA512 0d5c872dc797b69ab8ea4b83aebcbac20735b8c6f5adfcc2950aa4d6013d240f5fac3376e817da75ae0ccead50cec0d931619e135a050add438777457b086549
PATCHES
"fix-target-files.patch"
)
vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
PREFER_NINJA
OPTIONS
-DEVENT_INSTALL_CMAKE_DIR:PATH=share/libevent
-DEVENT__DISABLE_BENCHMARK=ON
-DEVENT__DISABLE_TESTS=ON
-DEVENT__DISABLE_REGRESS=ON
-DEVENT__DISABLE_SAMPLES=ON
)
vcpkg_install_cmake()
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
vcpkg_fixup_cmake_targets()
vcpkg_copy_pdbs()
file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/libevent)
file(RENAME ${CURRENT_PACKAGES_DIR}/share/libevent/LICENSE ${CURRENT_PACKAGES_DIR}/share/libevent/copyright)