Meta: Tell vcpkg we don't need to build vulkan-loader

Trying to build VulkanLoader from source is a giant headache of
unnecessary packages. Every modern distro has vulkan packages, let's
depend on those instead of trying to build something for both wayland
and X11.
This commit is contained in:
Andrew Kaster 2024-07-07 08:46:44 -06:00
parent e6432041b2
commit 22d7aa53fa
Notes: sideshowbarker 2024-07-17 08:55:54 +09:00
8 changed files with 8 additions and 54 deletions

View file

@ -26,8 +26,7 @@ runs:
sudo apt-get update
sudo apt-get install autoconf autoconf-archive automake build-essential cmake libavcodec-dev fonts-liberation2 zip curl tar ccache clang-18 clang++-18 lld-18 gcc-13 g++-13 libstdc++-13-dev \
ninja-build unzip qt6-base-dev qt6-tools-dev-tools libqt6svg6-dev qt6-multimedia-dev libgl1-mesa-dev libpulse-dev libssl-dev libegl1-mesa-dev \
libx11-dev libxrandr-dev
ninja-build unzip qt6-base-dev qt6-tools-dev-tools libqt6svg6-dev qt6-multimedia-dev libgl1-mesa-dev libpulse-dev libssl-dev libegl1-mesa-dev
sudo update-alternatives --install /usr/bin/clang clang /usr/bin/clang-18 100
sudo update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-18 100

View file

@ -49,7 +49,7 @@ jobs:
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y ninja-build unzip gcc-13 g++-13 jq wget curl zip tar autoconf autoconf-archive automake pkg-config libgl1-mesa-dev libx11-dev libxrandr-dev
sudo apt-get install -y ninja-build unzip gcc-13 g++-13 jq wget curl zip tar autoconf autoconf-archive automake pkg-config libgl1-mesa-dev
test -e /opt/wabt-1.0.35 || (
cd /tmp
wget https://github.com/WebAssembly/wabt/releases/download/1.0.35/wabt-1.0.35-ubuntu-20.04.tar.gz

View file

@ -28,7 +28,7 @@ sudo apt update -y && sudo apt install clang-18 -y
##### Required packages include, but are not limited to:
```
sudo apt install autoconf autoconf-archive automake build-essential cmake libavcodec-dev libgl1-mesa-dev ninja-build qt6-base-dev qt6-tools-dev-tools qt6-multimedia-dev ccache fonts-liberation2 zip unzip curl tar libssl-dev libx11-dev libxrandr-dev
sudo apt install autoconf autoconf-archive automake build-essential cmake libavcodec-dev libgl1-mesa-dev ninja-build qt6-base-dev qt6-tools-dev-tools qt6-multimedia-dev ccache fonts-liberation2 zip unzip curl tar libssl-dev
```
For Ubuntu 20.04 and above, ensure that the Qt6 Wayland packages are available:

View file

@ -1,29 +0,0 @@
set(VCPKG_LIBRARY_LINKAGE dynamic)
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO KhronosGroup/Vulkan-Loader
REF "vulkan-sdk-${VERSION}"
SHA512 8ec98e0da867f829e048e100a97d7b94a3c40f56f858e3eb81f11f6f58e20e59da6ca8785a9642958ff3b698c618b9968407028cc66dfa0ad296576bf9db45ca
HEAD_REF main
)
vcpkg_find_acquire_program(PKGCONFIG)
vcpkg_cmake_configure(
SOURCE_PATH "${SOURCE_PATH}"
OPTIONS
-DBUILD_TESTS:BOOL=OFF
-DPKG_CONFIG_EXECUTABLE="${PKGCONFIG}"
#-DBUILD_WSI_XCB_SUPPORT=OFF
#-DBUILD_WSI_XLIB_SUPPORT=OFF
)
vcpkg_cmake_install()
vcpkg_fixup_pkgconfig()
vcpkg_cmake_config_fixup(CONFIG_PATH "lib/cmake/VulkanLoader" PACKAGE_NAME VulkanLoader)
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE.txt")
set(VCPKG_POLICY_EMPTY_INCLUDE_FOLDER enabled)
configure_file("${CMAKE_CURRENT_LIST_DIR}/usage" "${CURRENT_PACKAGES_DIR}/share/${PORT}/usage" @ONLY)

View file

@ -1,2 +0,0 @@
The package @PORT@ provides the vulkan loader.
Please be aware of https://github.com/KhronosGroup/Vulkan-Loader/blob/main/docs/LoaderApplicationInterface.md#bundling-the-loader-with-an-application

View file

@ -1,19 +0,0 @@
{
"name": "vulkan-loader",
"version": "1.3.280.0",
"description": "Vulkan Development Tools",
"homepage": "https://github.com/KhronosGroup/Vulkan-Loader",
"license": null,
"supports": "!android",
"dependencies": [
{
"name": "vcpkg-cmake",
"host": true
},
{
"name": "vcpkg-cmake-config",
"host": true
},
"vulkan-headers"
]
}

View file

@ -0,0 +1 @@
set(VCPKG_POLICY_EMPTY_PACKAGE enabled)

View file

@ -0,0 +1,4 @@
{
"name": "vulkan",
"version-date": "2023-12-17"
}