[gflags] remove old patch, fixed upstream, introduce a new patch to fix wrong config path (#2917)

* [gflags] remove patch, fixed upstream

* [gflags] fix gflags-config.cmake wrong path
This commit is contained in:
Stefano Sinigardi 2018-03-01 17:30:03 +01:00 committed by Robert Schumacher
parent b21c895ca5
commit 9c10548fe9
4 changed files with 16 additions and 17 deletions

View File

@ -0,0 +1,13 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 3709073..8e919cb 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -503,7 +503,7 @@ endif ()
# ----------------------------------------------------------------------------
# installation rules
set (EXPORT_NAME ${PACKAGE_NAME}-targets)
-file (RELATIVE_PATH INSTALL_PREFIX_REL2CONFIG_DIR "${CMAKE_INSTALL_PREFIX}/${CONFIG_INSTALL_DIR}" "${CMAKE_INSTALL_PREFIX}")
+set (INSTALL_PREFIX_REL2CONFIG_DIR "../..")
configure_file (cmake/config.cmake.in "${PROJECT_BINARY_DIR}/${PACKAGE_NAME}-config-install.cmake" @ONLY)
configure_file (cmake/version.cmake.in "${PROJECT_BINARY_DIR}/${PACKAGE_NAME}-config-version.cmake" @ONLY)

View File

@ -1,3 +1,3 @@
Source: gflags
Version: 2.2.1-1
Version: 2.2.1-2
Description: A C++ library that implements commandline flags processing

View File

@ -14,7 +14,8 @@ vcpkg_from_github(
vcpkg_apply_patches(
SOURCE_PATH ${SOURCE_PATH}
PATCHES "${CMAKE_CURRENT_LIST_DIR}/revert-fix-install.patch"
PATCHES
${CMAKE_CURRENT_LIST_DIR}/0001-patch-dir.patch # gflags was estimating a wrong relative path between the gflags-config.cmake file and the include path; "../.." goes from share/gflags/ to the triplet root
)
vcpkg_configure_cmake(

View File

@ -1,15 +0,0 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 922a038..7d6af45 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -410,8 +410,8 @@ if (OS_WINDOWS)
set (RUNTIME_INSTALL_DIR "bin")
set (LIBRARY_INSTALL_DIR "lib")
set (INCLUDE_INSTALL_DIR "include")
- set (CONFIG_INSTALL_DIR "share/${PACKAGE_NAME}")
- set (PKGCONFIG_INSTALL_DIR "")
+ set (CONFIG_INSTALL_DIR "lib/cmake/${PACKAGE_NAME}")
+ set (PKGCONFIG_INSTALL_DIR)
else ()
set (RUNTIME_INSTALL_DIR bin)
# The LIB_INSTALL_DIR and LIB_SUFFIX variables are used by the Fedora