Skip to content

Commit

Permalink
[p-ranav-glob] add new port (microsoft#43583)
Browse files Browse the repository at this point in the history
Co-authored-by: Lily Wang <[email protected]>
  • Loading branch information
EfesX and LilyWangLL authored Feb 14, 2025
1 parent 4ec7491 commit a29711c
Show file tree
Hide file tree
Showing 6 changed files with 101 additions and 0 deletions.
47 changes: 47 additions & 0 deletions ports/p-ranav-glob/portfile.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
if(VCPKG_TARGET_IS_WINDOWS AND NOT VCPKG_TARGET_IS_MINGW)
vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
endif()

vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO p-ranav/glob
REF "v${VERSION}"
SHA512 2213c416d40dcd3a9e03c64a8d24d24d3d3c78847481efe4f10b26cd63b983a03e5ec5ea77dc0a0461a832793927e0bf237b7a47088fe99dafbb83aa482d2fe8
HEAD_REF master
PATCHES
remove_cpm.patch
)

vcpkg_from_github(
OUT_SOURCE_PATH PACKAGE_PROJECT_PATH
REPO TheLartians/PackageProject.cmake
REF v1.3
SHA512 a33ffd902d8e66f3a5a8304fd52fa4af1f74094877141b067c16ed022c8f40306ad7d334e1e1f9c4ca266a80468e107eb4198c78bafd3481a3e81aa178a3b723
HEAD_REF master
)

configure_file(
"${PACKAGE_PROJECT_PATH}/CMakeLists.txt"
"${SOURCE_PATH}/PackageProject.cmake"
COPYONLY
)
configure_file(
"${PACKAGE_PROJECT_PATH}/Config.cmake.in"
"${SOURCE_PATH}/Config.cmake.in"
COPYONLY
)
configure_file(
"${PACKAGE_PROJECT_PATH}/version.h.in"
"${SOURCE_PATH}/version.h.in"
COPYONLY
)

vcpkg_cmake_configure(SOURCE_PATH "${SOURCE_PATH}")
vcpkg_cmake_install()
vcpkg_cmake_config_fixup(CONFIG_PATH "lib/cmake/Glob-1.0" PACKAGE_NAME "Glob")
vcpkg_copy_pdbs()

file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")

vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE")
file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")
20 changes: 20 additions & 0 deletions ports/p-ranav-glob/remove_cpm.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 2549fb6..7de93f2 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -21,14 +21,9 @@ endif()
# ---- Add dependencies via CPM ----
# see https://github.com/TheLartians/CPM.cmake for more info

-include(cmake/CPM.cmake)

# PackageProject.cmake will be used to make our target installable
-CPMAddPackage(
- NAME PackageProject.cmake
- GITHUB_REPOSITORY TheLartians/PackageProject.cmake
- VERSION 1.3
-)
+include(PackageProject.cmake)

# ---- Add source files ----

4 changes: 4 additions & 0 deletions ports/p-ranav-glob/usage
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
The package glob provides CMake targets:

find_package(Glob CONFIG REQUIRED)
target_link_libraries(main PRIVATE Glob)
17 changes: 17 additions & 0 deletions ports/p-ranav-glob/vcpkg.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"name": "p-ranav-glob",
"version": "0.0.1",
"description": "Glob for C++17 ",
"homepage": "https://github.com/p-ranav/glob",
"license": "MIT",
"dependencies": [
{
"name": "vcpkg-cmake",
"host": true
},
{
"name": "vcpkg-cmake-config",
"host": true
}
]
}
4 changes: 4 additions & 0 deletions versions/baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -6904,6 +6904,10 @@
"baseline": "2020-12-14",
"port-version": 4
},
"p-ranav-glob": {
"baseline": "0.0.1",
"port-version": 0
},
"pagmo2": {
"baseline": "2.19.1",
"port-version": 0
Expand Down
9 changes: 9 additions & 0 deletions versions/p-/p-ranav-glob.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"versions": [
{
"git-tree": "6defe2268feb875b0cb23309729fdb3dbea44cce",
"version": "0.0.1",
"port-version": 0
}
]
}

0 comments on commit a29711c

Please sign in to comment.