Skip to content

Pre-compiled vcpkg root with Windows binary dependencies of the robotology-superbuild

Notifications You must be signed in to change notification settings

robotology/robotology-superbuild-dependencies-vcpkg

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

robotology-superbuild-dependencies-vcpkg

This repository contains the scripts to generate the Windows binaries for the dependencies of the robotology-superbuild using vcpkg.

For each release, the scripts in this repo generate two archives:

  • vcpkg-robotology.zip: contains the pre-compiled vcpkg dependencies of the robotology-superbuild, except the dependencies required by the ROBOTOLOGY_USES_GAZEBO.

The binaries are generated by installing vcpkg and any additional dependency in C:/robotology, and compressing the C:/robotology directory in a .zip archive.

Check in the releases page to download the archive with the dependencies, and to check the exact port included in each release.

Usage

To install , you just need to download either vcpkg-robotology.zip and extract it in the C:/ directory. The archive contains a robotology directory, that will be available in your system as C:/robotology .

To use then vcpkg libraries, you need to configure your CMake projects to use the vcpkg's toolchain as CMAKE_TOOLCHAIN_FILE, for example by configuring the projects as:

cmake -A x64 -DCMAKE_TOOLCHAIN_FILE=C:/robotology/vcpkg/scripts/buildsystems/vcpkg.cmake ..

See vcpkg's documentation for more info on how to use vcpkg-installed libraries.

If you prefer to avoid the use of the CMAKE_TOOLCHAIN_FILE, the archive also contains a few scripts that set in the enviroment the necessary enviroment variables to make sure that vcpkg dependencies can be found and used:

  • C:/robotology/scripts/setup-deps.bat : Batch script to set the enviroment variables in a Command Prompt terminal.
  • C:/robotology/scripts/setup-deps.sh : Bash script to set the enviroment variables in a Git for Windows bash terminal, can be included in the .bash_profile.
  • C:/robotology/scripts/addPathsToUserEnvVariables-deps.ps1 : Powershell scripts to permanently add or remove the enviroment
    variables in the User Enviroment Variables. Use of this scripts permit to avoid executing the setup-* scripts whenever it is necessary to execute cmake or the program that use the binaries contained in the dependencies archive, but can conflict with other programs or libraries installed in your system.

Install or remove vcpkg ports

You can install or remove ports from the vcpkg installation in C:/robotology/vcpkg as you do for any other vcpkg installation.

However, as this vcpkg installation contains some ports installed from the custom port repo contained in C:/robotology/vcpkg, due to a regression in vcpkg (see microsoft/vcpkg#15836) you need to pass the --overlay-ports=C:/robotology/robotology-vcpkg-binary-ports argument whenever you use vcpkg.

For example, to install a new port called <portname> the correct command is:

./vcpkg.exe install --overlay-ports=C:/robotology/robotology-vcpkg-binary-ports <portname>:x64-windows

pdb files

To reduce the size of the pre-compiled archives, the .pdb files (see https://stackoverflow.com/questions/3899573/what-is-a-pdb-file) that contain the debug symbols of the provided library are removed from both the Release and Debug version of the vcpkg-installed libraries. If you need to have the debug symbols of the vcpkg-installed libraries, it is suggested to install the vcpkg ports directly without relying on the pre-compiled archive provided by this repo.

GitHub Actions

To use the script in a GitHub Action script, you can use the following snippet:

    - name: Dependencies [Windows]
      if: matrix.os == 'windows-latest'
      run: |
        # To avoid spending a huge time compiling vcpkg dependencies, we download an archive  
        # that comes precompiled with all the ports that we need 
        choco install -y wget unzip
        # To avoid problems with non-relocatable packages, we unzip the archive exactly in the same directory
        # that has been used to create the pre-compiled archive
        cd C:/
        wget https://github.com/robotology/robotology-superbuild-dependencies-vcpkg/releases/download/<INSERT_HERE_THE_USED_VERSION>/vcpkg-robotology.zip
        unzip vcpkg-robotology.zip -d C:/
        rm vcpkg-robotology.zip

You can then specify the CMAKE_TOOLCHAIN_FILE for the CMake projects that you want that use the installed dependencies, or execute the enviroment variables setup scripts.

About

Pre-compiled vcpkg root with Windows binary dependencies of the robotology-superbuild

Resources

Stars

Watchers

Forks

Contributors 4

  •  
  •  
  •  
  •