mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-27 18:31:15 +08:00
[Libvault] new port (#28266)
* Add files via upload * [new port] avro-cpp * add boost-format * remove comments * remove comments * [libvault] new port * [libvault] new port * [libvault] new port * [libvault] new port * add [200~ * format * update versions file * Update ports/libvault/portfile.cmake Co-authored-by: Frank <65999885+FrankXie05@users.noreply.github.com> * update fix review * fix remarks * fix remarks * fix remarks * fix remarks * fix remarks * update version * add version * Implement find_dependency correctly. --------- Co-authored-by: Alexander Smyslov <aleksandr.smyslov@libertexgroup.com> Co-authored-by: Smyslov Alexander Nikolayevich <aleksandr.smyslov@fxclub.com> Co-authored-by: Frank <65999885+FrankXie05@users.noreply.github.com> Co-authored-by: Billy Robert O'Neal III <bion@microsoft.com>
This commit is contained in:
parent
6a3dd0874f
commit
7fc86fe37d
37
ports/libvault/0001-fix-dependencies.patch
Normal file
37
ports/libvault/0001-fix-dependencies.patch
Normal file
@ -0,0 +1,37 @@
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index cd4482b..ac50fb5 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -17,9 +17,8 @@ option(LINK_CURL "Link curl library for vault" OFF)
|
||||
option(BUILD_SHARED_LIBS "Build vault as a shared library" ON)
|
||||
option(INSTALL "Run install targets" ON)
|
||||
|
||||
-find_package(CURL)
|
||||
+find_package(CURL CONFIG REQUIRED)
|
||||
if(CURL_FOUND)
|
||||
- include_directories(${CURL_INCLUDE_DIR})
|
||||
else(CURL_FOUND)
|
||||
message(FATAL_ERROR "CURL not found")
|
||||
endif(CURL_FOUND)
|
||||
@@ -126,7 +125,7 @@ set_target_properties(
|
||||
target_include_directories(vault PRIVATE src)
|
||||
|
||||
if(LINK_CURL)
|
||||
- target_link_libraries(vault curl)
|
||||
+ target_link_libraries(vault CURL::libcurl)
|
||||
endif(LINK_CURL)
|
||||
|
||||
if(ENABLE_COVERAGE)
|
||||
diff --git a/VaultConfig.cmake.in b/VaultConfig.cmake.in
|
||||
index 67a40ab..82db52d 100644
|
||||
--- a/VaultConfig.cmake.in
|
||||
+++ b/VaultConfig.cmake.in
|
||||
@@ -1,5 +1,8 @@
|
||||
@PACKAGE_INIT@
|
||||
|
||||
+include(CMakeFindDependencyMacro)
|
||||
+find_dependency(CURL CONFIG)
|
||||
+
|
||||
include("${CMAKE_CURRENT_LIST_DIR}/libvaultTargets.cmake")
|
||||
|
||||
check_required_components(vault)
|
32
ports/libvault/portfile.cmake
Normal file
32
ports/libvault/portfile.cmake
Normal file
@ -0,0 +1,32 @@
|
||||
vcpkg_from_github(
|
||||
OUT_SOURCE_PATH SOURCE_PATH
|
||||
REPO abedra/libvault
|
||||
REF 0.56.0
|
||||
SHA512 6a8d14a755ea3d39c2912ee6d33cec9c6f30a498c57efc40603cecbbd90d400dba52be7b42287c87cd425694c89edbae86218021b2beaa5edca748c3d5dd7c77
|
||||
PATCHES
|
||||
0001-fix-dependencies.patch
|
||||
)
|
||||
|
||||
vcpkg_cmake_configure(
|
||||
SOURCE_PATH "${SOURCE_PATH}"
|
||||
OPTIONS
|
||||
-DENABLE_TEST=OFF
|
||||
-DLINK_CURL=ON
|
||||
)
|
||||
|
||||
vcpkg_cmake_install()
|
||||
|
||||
vcpkg_cmake_config_fixup(PACKAGE_NAME libvault CONFIG_PATH lib/cmake/libvault)
|
||||
vcpkg_fixup_pkgconfig()
|
||||
|
||||
vcpkg_copy_pdbs()
|
||||
|
||||
|
||||
file(INSTALL "${SOURCE_PATH}/LICENSE"
|
||||
DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}"
|
||||
RENAME copyright)
|
||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include"
|
||||
"${CURRENT_PACKAGES_DIR}/debug/share")
|
||||
|
||||
# Install usage
|
||||
configure_file("${CMAKE_CURRENT_LIST_DIR}/usage" "${CURRENT_PACKAGES_DIR}/share/${PORT}/usage" @ONLY)
|
4
ports/libvault/usage
Normal file
4
ports/libvault/usage
Normal file
@ -0,0 +1,4 @@
|
||||
libvault provides CMake targets:
|
||||
|
||||
find_package(libvault CONFIG REQUIRED)
|
||||
target_link_libraries(main PRIVATE libvault::vault)
|
19
ports/libvault/vcpkg.json
Normal file
19
ports/libvault/vcpkg.json
Normal file
@ -0,0 +1,19 @@
|
||||
{
|
||||
"name": "libvault",
|
||||
"version": "0.56.0",
|
||||
"description": "A C++ library for Hashicorp Vault",
|
||||
"homepage": "https://github.com/abedra/libvault",
|
||||
"license": "MIT",
|
||||
"supports": "!uwp",
|
||||
"dependencies": [
|
||||
"curl",
|
||||
{
|
||||
"name": "vcpkg-cmake",
|
||||
"host": true
|
||||
},
|
||||
{
|
||||
"name": "vcpkg-cmake-config",
|
||||
"host": true
|
||||
}
|
||||
]
|
||||
}
|
@ -4656,6 +4656,10 @@
|
||||
"baseline": "2020-11-24",
|
||||
"port-version": 4
|
||||
},
|
||||
"libvault": {
|
||||
"baseline": "0.56.0",
|
||||
"port-version": 0
|
||||
},
|
||||
"libvmdk": {
|
||||
"baseline": "20200926",
|
||||
"port-version": 4
|
||||
|
9
versions/l-/libvault.json
Normal file
9
versions/l-/libvault.json
Normal file
@ -0,0 +1,9 @@
|
||||
{
|
||||
"versions": [
|
||||
{
|
||||
"git-tree": "3ab55180dfc75f58d833bae81f6e303416c992e6",
|
||||
"version": "0.56.0",
|
||||
"port-version": 0
|
||||
}
|
||||
]
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user