vcpkg registry for GlobalPlatform library.
NOTE: The existing workflow updates the registry automatically on version updates of the GlobalPlatform library.
Update the GlobalPlatform library version:
nano ports/globalplatform/vcpkg.jsonSet the version accordingly:
"version": "8.0.0",
Update the tag and set the SHA512 to 0:
nano ports/globalplatform/portfile.cmake Set the tag:
REF <tag>
Copy the failed hash value from the install command:
rm ~/vcpkg/downloads/kaoh-globalplatform*
~/vcpkg/vcpkg install globalplatform --overlay-ports=./portsYou will see a message like:
error: failing download because the expected SHA512 was all zeros, please change the expected SHA512 to: 0a66f9254390fbc27f048a76f96f9a9f858a903f55fbc67c42dd083a55b8537e6a7c436d76d67d71d327b9dd153b0832b5b46dcacce2284e9ca6bd5108d576ab
Replace the SHA512 value:
nano ports/globalplatform/portfile.cmake~/vcpkg/vcpkg x-add-version globalplatform --x-builtin-ports-root=./ports --x-builtin-registry-versions-dir=./versions --overwrite-versionCreate vcpkg.json in the project:
{
"name": "globalplatform-consumer",
"version-string": "0.0.0",
"dependencies": [
"globalplatform"
],
"builtin-baseline": "aa2d37682e3318d93aef87efa7b0e88e81cd3d59"
}Create vcpkg-configuration.json in the project:
{
"registries": [
{
"kind": "git",
"baseline": "fd4199d65c3dabbc653f5e741b77753252b7eab6",
"repository": "https://github.com/kaoh/globalplatform-vcpkg-registry",
"packages": [
"globalplatform"
]
}
]
}Update baseline:
~/vcpkg/vcpkg x-update-baseline --add-initial-baseline Create a CMake project like:
cmake_minimum_required(VERSION 3.20)
project(globalplatform_consumer C)
find_package(globalplatform CONFIG REQUIRED)
find_package(gppcscconnectionplugin CONFIG REQUIRED)
add_executable(test_gp main.c)
if(WIN32)
target_compile_definitions(test_gp PRIVATE UNICODE _UNICODE)
endif()
target_link_libraries(test_gp PRIVATE globalplatform::globalplatform)
target_link_libraries(test_gp PRIVATE gppcscconnectionplugin::gppcscconnectionplugin)
get_target_property(_type globalplatform::globalplatform TYPE)Then run CMake:
cmake -S . -B build -G Ninja \
-DCMAKE_MAKE_PROGRAM=/usr/bin/ninja \
-DCMAKE_TOOLCHAIN_FILE=~/vcpkg/scripts/buildsystems/vcpkg.cmake
cmake --build build