Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[libevent] Fix library cannot be found #14805

Merged
merged 1 commit into from
Nov 30, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions ports/libevent/CONTROL
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
Source: libevent
Version: 2.1.12
Port-Version: 1
Homepage: https://github.com/libevent/libevent
Description: An event notification library
Supports: !uwp
Expand Down
15 changes: 12 additions & 3 deletions ports/libevent/fix-LibeventConfig_cmake_in_path.patch
Original file line number Diff line number Diff line change
@@ -1,13 +1,22 @@
diff --git a/cmake/LibeventConfig.cmake.in b/cmake/LibeventConfig.cmake.in
index 7b808c3..fbf67be 100644
index 7b808c3..9376a5a 100644
--- a/cmake/LibeventConfig.cmake.in
+++ b/cmake/LibeventConfig.cmake.in
@@ -58,7 +58,7 @@ endif()

# Get the path of the current file.
get_filename_component(LIBEVENT_CMAKE_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH)
-get_filename_component(_INSTALL_PREFIX "${LIBEVENT_CMAKE_DIR}/../../.." ABSOLUTE)
+get_filename_component(_INSTALL_PREFIX "${LIBEVENT_CMAKE_DIR}/../.." ABSOLUTE)

macro(message_if_needed _flag _msg)
if (NOT ${CMAKE_FIND_PACKAGE_NAME}_FIND_QUIETLY)
@@ -131,7 +131,7 @@ if(CONFIG_FOR_INSTALL_TREE)
find_library(_event_lib
NAMES "event_${_comp}"
PATHS "${_INSTALL_PREFIX}/lib"
- NO_DEFAULT_PATH)
+ )
if(_event_lib)
list(APPEND LIBEVENT_LIBRARIES "libevent::${_comp}")
set_case_insensitive_found(${_comp})
2 changes: 1 addition & 1 deletion ports/libevent/portfile.cmake
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
vcpkg_fail_port_install(MESSAGE "${PORT} does not currently support UWP" ON_TARGET "uwp")
vcpkg_fail_port_install(ON_TARGET "uwp")

vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
Expand Down