forked from microsoft/vcpkg
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[p-ranav-glob] add new port (microsoft#43583)
Co-authored-by: Lily Wang <[email protected]>
- Loading branch information
1 parent
4ec7491
commit a29711c
Showing
6 changed files
with
101 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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}") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 ---- | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
} | ||
] | ||
} |