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

[glog] Fixed gflags dependency #18739

Merged
merged 11 commits into from
Aug 27, 2021
Merged
Show file tree
Hide file tree
Changes from 9 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
5 changes: 3 additions & 2 deletions ports/gflags/CONTROL
Original file line number Diff line number Diff line change
@@ -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
Supports: !uwp
5 changes: 4 additions & 1 deletion ports/gflags/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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
)

Expand All @@ -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 changes: 4 additions & 0 deletions ports/gflags/usage
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
The package gflags provides CMake targets:

find_package(gflags CONFIG REQUIRED)
target_link_libraries(main PRIVATE gflags::gflags)
9 changes: 9 additions & 0 deletions ports/gflags/vcpkg-cmake-wrapper.cmake
Original file line number Diff line number Diff line change
@@ -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)
4 changes: 2 additions & 2 deletions versions/baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -2265,8 +2265,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",
Expand Down
5 changes: 5 additions & 0 deletions versions/g-/gflags.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "7be1ab177fce40e480399f20a62004afdbb24e5a",
"version-string": "2.2.2",
"port-version": 2
},
{
"git-tree": "7dd635d5295af145f4601ba13219aa0d84630f27",
"version-string": "2.2.2-1",
Expand Down