[libenvpp] new port (#28532)

This commit is contained in:
Nick 2023-01-04 20:57:09 +01:00 committed by GitHub
parent 0f719b3fdf
commit 4e30bb39dd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 86 additions and 0 deletions

View File

@ -0,0 +1,12 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index dc57bb1..932cefc 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -63,6 +63,7 @@ FetchContent_Declare(fmt
GIT_TAG 9.1.0
)
FetchContent_MakeAvailable(fmt)
+find_package(fmt CONFIG REQUIRED)
if(LIBENVPP_TESTS)
FetchContent_Declare(Catch2

View File

@ -0,0 +1,12 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index dc57bb1..1c4f1e6 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -131,6 +131,7 @@ endif()
# Installation target.
if(LIBENVPP_INSTALL)
+ include(CMakePackageConfigHelpers)
# Libenvpp installation.
set(LIBENVPP_PROJECT_CONFIG_OUT "${CMAKE_CURRENT_BINARY_DIR}/libenvpp-config.cmake")
set(LIBENVPP_VERSION_CONFIG_FILE "${CMAKE_CURRENT_BINARY_DIR}/libenvpp-config-version.cmake")

View File

@ -0,0 +1,30 @@
vcpkg_minimum_required(VERSION 2022-10-12) # for ${VERSION}
vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO ph3at/libenvpp
REF v${VERSION}
SHA512 d8d2e6405311be1cba47cdf1c8b29018c84716a0d34a18bf3b6fa8c05f5eddf447ddee407a407d765e92296c5d7e7b5f2fe4561fb66f5165826825158ef82fc8
HEAD_REF main
PATCHES
fix-dependencies.patch
fix-install.patch
)
vcpkg_cmake_configure(
SOURCE_PATH "${SOURCE_PATH}"
OPTIONS
-DLIBENVPP_EXAMPLES=OFF
-DLIBENVPP_TESTS=OFF
-DLIBENVPP_CHECKS=OFF
-DLIBENVPP_INSTALL=ON
)
vcpkg_cmake_install()
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/${PORT})
vcpkg_copy_pdbs()
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE")

19
ports/libenvpp/vcpkg.json Normal file
View File

@ -0,0 +1,19 @@
{
"name": "libenvpp",
"version": "1.0.0",
"description": "A modern C++ library for type-safe environment variable parsing ",
"homepage": "https://github.com/ph3at/libenvpp",
"license": "Apache-2.0",
"supports": "!uwp",
"dependencies": [
"fmt",
{
"name": "vcpkg-cmake",
"host": true
},
{
"name": "vcpkg-cmake-config",
"host": true
}
]
}

View File

@ -3732,6 +3732,10 @@
"baseline": "1.2.6",
"port-version": 0
},
"libenvpp": {
"baseline": "1.0.0",
"port-version": 0
},
"libepoxy": {
"baseline": "1.5.10",
"port-version": 1

View File

@ -0,0 +1,9 @@
{
"versions": [
{
"git-tree": "8eb66698367b380452b1f693237d383381e2373e",
"version": "1.0.0",
"port-version": 0
}
]
}