Skip to content

tuero/vcpkg-registry

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

44 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Personal vcpkg registry, triplets, and toolchain files.

Packages supported

The following packages are supported

Using this registry

Create your vcpkg project

vcpkg new --application

To add tuero/vcpkg-registry as a git registry to your vcpkg project:

"registries": [
...
{
    "kind": "git",
    "repository": "https://github.com/tuero/vcpkg-registry",
    "reference": "master",
    "baseline": "<COMMIT_SHA>",
    "packages": [
        "boulderdash",
        "craftworld",
        "libpolicyts",
        "sokoban",
        "tsp",
        "tinytensor",
        "tsp"
    ]
}
]
...

where <COMMIT_SHA> is the 40-character git commit sha in the registry's repository (you can find this by clicking on the latest commit here and looking at the URL. You can also find the latest <COMMIT_SHA> by entering the following:

git ls-remote https://github.com/tuero/vcpkg-registry HEAD

Adding a repository to this registry

Copy one of the ports/ files and make a new directory for the package.

To get the SHA512, remove the package if it exists, try to add it again with a SHA512 0, and look at the error message to get the SHA512.

vcpkg remove MY_PACKAGE
vcpkg install MY_PACKAGE --overlay-ports=./ports

Then, update the versions database (below)

Updating the verions database

Run the following

vcpkg --x-builtin-ports-root=./ports --x-builtin-registry-versions-dir=./versions x-add-version --all --verbose

Toolchains and Triplets

The default vcpkg toolchains do not respect the CC and CXX environment variables. I've copied those defaults, but made the following changes:

  • Respects CC, CXX, and FC
  • Disables cross compiling

When using GCC on OSX, libstdc++ expects quick_exit/at_quick_exit to be visible in the SDK headers, which requires _DARWIN_C_SOURCE. The OSX toolchain sets this when using GCC. See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93469

Additionally, libpolicyts uses the environment variable LIBTORCH_ROOT to libtorch (usually from a conda environment), but this is not part of the vcpkg pacakge ABI by default. This is usually done in the triplets, which can put environment variables into the ABI, which is what the included triplets do.

I've made versions for Linux/OSX (arm64), with both dynamic and static linking. To use these toolchains/triplets, set the following cache variables (preferably in CMakePresets.json)

"cacheVariables": {
    "CMAKE_TOOLCHAIN_FILE": "$env{VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake",
    "VCPKG_OVERLAY_TRIPLETS": "${sourceDir}/cmake/triplets",
    "VCPKG_TARGET_TRIPLET": "x64-linux-static",
    "VCPKG_HOST_TRIPLET": "x64-linux-static",
    "VCPKG_CHAINLOAD_TOOLCHAIN_FILE": "${sourceDir}/cmake/toolchains/linux-toolchain.cmake"
}

To use the toolchain directly when invoking cmake:

cmake --toolchain <PATH>/toolchains/<FILE>.cmake <ARGS> ..

About

Personal vcpkg registry

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages