aboutsummaryrefslogtreecommitdiff
path: root/vcpkg/ports/libenvpp
diff options
context:
space:
mode:
Diffstat (limited to 'vcpkg/ports/libenvpp')
-rw-r--r--vcpkg/ports/libenvpp/fix-dependencies.patch13
-rw-r--r--vcpkg/ports/libenvpp/portfile.cmake29
-rw-r--r--vcpkg/ports/libenvpp/vcpkg.json19
3 files changed, 61 insertions, 0 deletions
diff --git a/vcpkg/ports/libenvpp/fix-dependencies.patch b/vcpkg/ports/libenvpp/fix-dependencies.patch
new file mode 100644
index 0000000..bbf44a5
--- /dev/null
+++ b/vcpkg/ports/libenvpp/fix-dependencies.patch
@@ -0,0 +1,13 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index e1be3db..5fbd072 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -77,7 +77,7 @@ macro(fetch_content_from_submodule DEPNAME RELPATH)
+ endif()
+ endmacro()
+
+-fetch_content_from_submodule(fmt external/fmt)
++find_package(fmt CONFIG REQUIRED)
+
+ if(LIBENVPP_TESTS)
+ fetch_content_from_submodule(Catch2 external/Catch2)
diff --git a/vcpkg/ports/libenvpp/portfile.cmake b/vcpkg/ports/libenvpp/portfile.cmake
new file mode 100644
index 0000000..c241e17
--- /dev/null
+++ b/vcpkg/ports/libenvpp/portfile.cmake
@@ -0,0 +1,29 @@
+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 6a56a16a4ba0e3fe97dcf4de2fbf8aba17d2e237c9d6daf559599d237a3e89ec951d2aefc845b79758b73a6bb72a2c69fac25d679127027158a1173d561398aa
+ HEAD_REF main
+ PATCHES
+ fix-dependencies.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")
diff --git a/vcpkg/ports/libenvpp/vcpkg.json b/vcpkg/ports/libenvpp/vcpkg.json
new file mode 100644
index 0000000..e143598
--- /dev/null
+++ b/vcpkg/ports/libenvpp/vcpkg.json
@@ -0,0 +1,19 @@
+{
+ "name": "libenvpp",
+ "version": "1.5.1",
+ "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
+ }
+ ]
+}