Skip to content

aungthetnaing/vcpkg-registry

 
 

Repository files navigation

vcpkg-registry

Build Status CircleCI

Targets...

References

How To

Setup

user@host:~$ git clone https://github.com/microsoft/vcpkg
...
user@host:~$ pushd ./vcpkg/
~/vcpkg ~
user@host:~/vcpkg$ git clone https://github.com/luncliff/vcpkg-registry registry
...

Don't forget to check the vcpkg environment variables are correct.

The overall file organization is like the following.

user@host:~/vcpkg$ tree -L 2 ./registry/
./registry/
├── LICENSE
├── README.md
├── azure-pipelines.yml
├── versions
│   ├── ...
│   └── baseline.json
├── ports
│   ├── ...
│   ├── directml
│   ├── libdispatch
│   ├── openssl3
│   └── tensorflow-lite
└── triplets
    ├── arm64-android.cmake
    ├── x64-android.cmake
    ├── arm-android.cmake
    ├── arm64-ios-simulator.cmake
    └── x64-ios-simulator.cmake

For Registry

For registry customization, configure your vcpkg-configuration.json.

user@host:~/vcpkg$ cat ./vcpkg-configuration.json | jq
{
  "registries": [
...

The sample configuration can be like this. The ports/ folder contains openssl3 and tensorflow-lite. Put them in the "packages".

{
    "registries": [
        {
            "kind": "git",
            "repository": "https://github.com/luncliff/vcpkg-registry",
            "packages": [
                "openssl3",
                "tensorflow-lite"
            ],
            "baseline": "0000..."
        }
    ]
}

Install

with Ports (Overlay)

Just provide the path of port/ folder.

user@host:~/vcpkg$ ./vcpkg install --overlay-ports="registry/ports" cpuinfo

If it doesn't work, check the command options.

user@host:~/vcpkg$ ./vcpkg help install
...
Options:
...
  --overlay-ports=<path>          Specify directories to be used when searching for ports
                                  (also: $VCPKG_OVERLAY_PORTS)
...

with Triplets (Overlay)

user@host:~/vcpkg$ ./vcpkg install --overlay-triplets="registry/triplets" --triplet x64-ios-simulator zlib-ng

If it doesn't work, check the command options.

user@host:~/vcpkg$ ./vcpkg help install
...
Options:
...
  --overlay-triplets=<path>       Specify directories containing triplets files
                                  (also: $VCPKG_OVERLAY_TRIPLETS)
...
1. Android
  • arm64-android
  • arm-android
  • x64-android

Check Vcpkg and Android for more detailed usage.

The triplets help

user@host:~/vcpkg$ export ANDROID_NDK_HOME="/.../Library/Android/sdk/ndk/23.0.7599858/"
user@host:~/vcpkg$ ./vcpkg install --overlay-triplets=./registry/triplets vulkan:arm64-android
Starting package 1/1: vulkan:arm64-android
Building package vulkan[core]:arm64-android...
-- [OVERLAY] Loading triplet configuration from: /.../Desktop/vcpkg/vcpkg-registry/triplets/arm64-android.cmake
-- Using NDK_HOST_TAG: darwin-x86_64
-- Using NDK_API_LEVEL: 24
-- Found NDK: 23.0.7599858 (23.0)
-- Using ENV{VULKAN_SDK}: /.../Library/Android/sdk/ndk/23.0.7599858/toolchains/llvm/prebuilt/darwin-x86_64/sysroot/usr
-- Found libvulkan.so: /.../Library/Android/sdk/ndk/23.0.7599858/toolchains/llvm/prebuilt/darwin-x86_64/sysroot/usr/lib/x86_64-linux-android/24/libvulkan.so
-- 
-- Querying VULKAN_SDK Enviroment variable
-- Searching /.../Library/Android/sdk/ndk/23.0.7599858/toolchains/llvm/prebuilt/darwin-x86_64/sysroot/usr/include/vulkan/ for vulkan.h
-- Found vulkan.h
-- Performing post-build validation
-- Performing post-build validation done
2. iOS Simulator
  • arm64-ios-simulator
  • x64-ios-simulator

These triplets acquire VCPKG_OSX_SYSROOT for iOS Simulator SDK. Also, specifies C/C++ flags minimum SDK version to iOS 11.0 if VCPKG_CMAKE_SYSTEM_VERSION is not provided.

These triplets won't do much work. I recommend you to use https://github.com/leetal/ios-cmake with VCPKG_CHAINLOAD_TOOLCHAIN_FILE.

with Registry

Provide the feature flags to install with registry informations in vcpkg-configuration.json.

user@host:~/vcpkg$ ./vcpkg install --feature-flags=registries openssl3
Computing installation plan...
...

After the installation, you can list the packages.

user@host:~/vcpkg$ ./vcpkg list openssl3
...

License

The work is for the community.
CC0 1.0 Public Domain for all files.

However, the repository is holding The Unlicense for possible future, software related works. Especially for nested source files, not the distributed source files of the other projects.

About

vcpkg registry maintained by @luncliff

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • CMake 96.0%
  • PowerShell 2.0%
  • C++ 2.0%