mirror of
https://github.com/cemu-project/vcpkg.git
synced 2025-02-23 11:07:10 +01:00
Merge pull request #2771 from KindDragon/libevent-targets-fix
[libevent] Fix generated libevent targets files
This commit is contained in:
commit
267a98536c
36
ports/libevent/fix-target-files.patch
Normal file
36
ports/libevent/fix-target-files.patch
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||||
|
index b4a34f3d..4bd80d84 100644
|
||||||
|
--- a/CMakeLists.txt
|
||||||
|
+++ b/CMakeLists.txt
|
||||||
|
@@ -1343,10 +1343,10 @@ endif()
|
||||||
|
set(EVENT_INSTALL_CMAKE_DIR ${DEF_INSTALL_CMAKE_DIR} CACHE PATH "Installation directory for CMake files")
|
||||||
|
|
||||||
|
# Make sure the paths are absolute.
|
||||||
|
-foreach(p LIB BIN INCLUDE CMAKE)
|
||||||
|
+foreach(p INCLUDE CMAKE)
|
||||||
|
set(var EVENT_INSTALL_${p}_DIR)
|
||||||
|
if(NOT IS_ABSOLUTE "${${var}}")
|
||||||
|
- set(${var} "${CMAKE_INSTALL_PREFIX}/${${var}}")
|
||||||
|
+ set(${var}_FULL "${CMAKE_INSTALL_PREFIX}/${${var}}")
|
||||||
|
endif()
|
||||||
|
endforeach()
|
||||||
|
|
||||||
|
@@ -1371,15 +1371,15 @@ configure_file(${PROJECT_SOURCE_DIR}/cmake/LibeventConfigBuildTree.cmake.in
|
||||||
|
# Generate the config file for the installation tree.
|
||||||
|
file(RELATIVE_PATH
|
||||||
|
REL_INCLUDE_DIR
|
||||||
|
- "${EVENT_INSTALL_CMAKE_DIR}"
|
||||||
|
- "${EVENT_INSTALL_INCLUDE_DIR}") # Calculate the relative directory from the Cmake dir.
|
||||||
|
+ "${EVENT_INSTALL_CMAKE_DIR_FULL}"
|
||||||
|
+ "${EVENT_INSTALL_INCLUDE_DIR_FULL}") # Calculate the relative directory from the Cmake dir.
|
||||||
|
|
||||||
|
# Note the EVENT_CMAKE_DIR is defined in LibeventConfig.cmake.in,
|
||||||
|
# we escape it here so it's evaluated when it is included instead
|
||||||
|
# so that the include dirs are givenrelative to where the
|
||||||
|
# config file is located.
|
||||||
|
set(EVENT__INCLUDE_DIRS
|
||||||
|
- "\${EVENT_CMAKE_DIR}/${REL_INCLUDE_DIR}")
|
||||||
|
+ "\${EVENT_CMAKE_DIR_FULL}/${REL_INCLUDE_DIR}")
|
||||||
|
|
||||||
|
configure_file(${PROJECT_SOURCE_DIR}/cmake/LibeventConfig.cmake.in
|
||||||
|
${PROJECT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/LibeventConfig.cmake
|
@ -11,8 +11,20 @@ vcpkg_from_github(
|
|||||||
SHA512 0d5c872dc797b69ab8ea4b83aebcbac20735b8c6f5adfcc2950aa4d6013d240f5fac3376e817da75ae0ccead50cec0d931619e135a050add438777457b086549
|
SHA512 0d5c872dc797b69ab8ea4b83aebcbac20735b8c6f5adfcc2950aa4d6013d240f5fac3376e817da75ae0ccead50cec0d931619e135a050add438777457b086549
|
||||||
)
|
)
|
||||||
|
|
||||||
|
vcpkg_apply_patches(
|
||||||
|
SOURCE_PATH ${SOURCE_PATH}
|
||||||
|
PATCHES
|
||||||
|
"${CMAKE_CURRENT_LIST_DIR}/fix-target-files.patch"
|
||||||
|
)
|
||||||
|
|
||||||
vcpkg_configure_cmake(
|
vcpkg_configure_cmake(
|
||||||
SOURCE_PATH ${SOURCE_PATH}
|
SOURCE_PATH ${SOURCE_PATH}
|
||||||
|
PREFER_NINJA
|
||||||
|
OPTIONS
|
||||||
|
-DEVENT__DISABLE_BENCHMARK=ON
|
||||||
|
-DEVENT__DISABLE_TESTS=ON
|
||||||
|
-DEVENT__DISABLE_REGRESS=ON
|
||||||
|
-DEVENT__DISABLE_SAMPLES=ON
|
||||||
)
|
)
|
||||||
|
|
||||||
vcpkg_install_cmake()
|
vcpkg_install_cmake()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user