Merge pull request #2771 from KindDragon/libevent-targets-fix

[libevent] Fix generated libevent targets files
This commit is contained in:
Robert Schumacher 2018-02-16 21:20:07 -08:00 committed by GitHub
commit 267a98536c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 48 additions and 0 deletions

View 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

View File

@ -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()