[glog] Fixed gflags dependency (#18739)

This commit is contained in:
bucurb 2021-08-28 00:43:13 +01:00 committed by GitHub
parent c350a3b712
commit 3582b8a4f0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 26 additions and 4 deletions

View File

@ -1,5 +1,6 @@
Source: gflags
Version: 2.2.2-1
Version: 2.2.2
Port-Version: 2
Homepage: https://github.com/gflags/gflags
Description: A C++ library that implements commandline flags processing
Supports: !uwp

View File

@ -20,6 +20,7 @@ vcpkg_configure_cmake(
-DGFLAGS_REGISTER_BUILD_DIR:BOOL=OFF
-DGFLAGS_REGISTER_INSTALL_PREFIX:BOOL=OFF
-DBUILD_gflags_nothreads_LIB:BOOL=OFF
-DGFLAGS_USE_TARGET_NAMESPACE:BOOL=ON
-DCMAKE_DEBUG_POSTFIX=d
)
@ -33,6 +34,8 @@ endif()
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share)
file(INSTALL ${SOURCE_PATH}/COPYING.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/gflags RENAME copyright)
file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")
file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")
file(INSTALL "${SOURCE_PATH}/COPYING.txt" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
vcpkg_copy_pdbs()

4
ports/gflags/usage Normal file
View File

@ -0,0 +1,4 @@
The package gflags provides CMake targets:
find_package(gflags CONFIG REQUIRED)
target_link_libraries(main PRIVATE gflags::gflags)

View File

@ -0,0 +1,9 @@
set(GFLAGS_USE_TARGET_NAMESPACE ON)
_find_package(${ARGS})
foreach(tgt gflags gflags_shared gflags_static)
if (NOT TARGET ${tgt} AND TARGET "gflags::${tgt}")
add_library(${tgt} ALIAS "gflags::${tgt}")
endif()
endforeach(tgt)

View File

@ -2293,8 +2293,8 @@
"port-version": 0
},
"gflags": {
"baseline": "2.2.2-1",
"port-version": 0
"baseline": "2.2.2",
"port-version": 2
},
"ghc-filesystem": {
"baseline": "1.5.4",

View File

@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "1e2bb870b1e3592591d62f396378e25b2678d80c",
"version-string": "2.2.2",
"port-version": 2
},
{
"git-tree": "7dd635d5295af145f4601ba13219aa0d84630f27",
"version-string": "2.2.2-1",