Skip to content

Commit

Permalink
Meta: Add vulkan and vulkan-headers to vcpkg dependencies
Browse files Browse the repository at this point in the history
Also require a specific ICU version to not run into unexpected problems.
  • Loading branch information
ADKaster authored and kalenikaliaksandr committed Jul 5, 2024
1 parent c84ff9f commit bd97442
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 6 deletions.
4 changes: 3 additions & 1 deletion .github/actions/setup/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,9 @@ runs:
sudo add-apt-repository ppa:ubuntu-toolchain-r/test
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
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
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
Expand Down
3 changes: 2 additions & 1 deletion Meta/CMake/vulkan.cmake
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
if (NOT APPLE)
find_package(VulkanHeaders CONFIG QUIET)
find_package(Vulkan QUIET)
if (Vulkan_FOUND)
if (VulkanHeaders_FOUND AND Vulkan_FOUND)
set(HAS_VULKAN ON CACHE BOOL "" FORCE)
add_compile_definitions(USE_VULKAN=1)
endif()
Expand Down
3 changes: 1 addition & 2 deletions Userland/Libraries/LibCore/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,6 @@ else()
endif()

if (HAS_VULKAN)
include_directories(${Vulkan_INCLUDE_DIR})
list(APPEND SOURCES VulkanContext.cpp)
endif()

Expand Down Expand Up @@ -112,5 +111,5 @@ if (ANDROID)
endif()

if (HAS_VULKAN)
target_link_libraries(LibCore PUBLIC ${Vulkan_LIBRARIES})
target_link_libraries(LibCore PUBLIC Vulkan::Vulkan Vulkan::Headers)
endif()
2 changes: 1 addition & 1 deletion Userland/Libraries/LibUnicode/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,5 @@ set(GENERATED_SOURCES ${CURRENT_LIB_GENERATED})

serenity_lib(LibUnicode unicode)

find_package(ICU REQUIRED COMPONENTS data i18n uc)
find_package(ICU 74 REQUIRED COMPONENTS data i18n uc)
target_link_libraries(LibUnicode PRIVATE ICU::i18n ICU::uc ICU::data)
10 changes: 9 additions & 1 deletion vcpkg.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,15 @@
"platform": "android"
},
"sqlite3",
"woff2"
"woff2",
{
"name": "vulkan",
"platform": "!android"
},
{
"name": "vulkan-headers",
"platform": "!android"
}
],
"overrides": [
{
Expand Down

0 comments on commit bd97442

Please sign in to comment.