Skip to content

Commit

Permalink
[mesa] Add vulkan-drivers feature
Browse files Browse the repository at this point in the history
  • Loading branch information
dg0yt committed Jan 9, 2024
1 parent 3bc5ff7 commit d8670f1
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 0 deletions.
10 changes: 10 additions & 0 deletions ports/mesa/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,14 @@ endif()

list(APPEND MESA_OPTIONS -Dshared-glapi=enabled) #shared GLAPI required when building two or more of the following APIs - opengl, gles1 gles2

vcpkg_list(SET ADDITIONAL_BINARIES)
if("vulkan-drivers" IN_LIST FEATURES)
list(APPEND MESA_OPTIONS -Dvulkan-drivers=auto)
vcpkg_list(APPEND ADDITIONAL_BINARIES "glslangValidator = '${CURRENT_HOST_INSTALLED_DIR}/tools/glslang/glslangValidator${VCPKG_HOST_EXECUTABLE_SUFFIX}'")
else()
list(APPEND MESA_OPTIONS -Dvulkan-drivers=[])
endif()

if(VCPKG_TARGET_IS_WINDOWS)
list(APPEND MESA_OPTIONS -Dplatforms=['windows'])
list(APPEND MESA_OPTIONS -Dmicrosoft-clc=disabled)
Expand All @@ -103,6 +111,8 @@ vcpkg_configure_meson(
#-D egl-lib-suffix=_mesa
-Dbuild-tests=false
${MESA_OPTIONS}
ADDITIONAL_BINARIES
${ADDITIONAL_BINARIES}
)
vcpkg_install_meson()
vcpkg_fixup_pkgconfig()
Expand Down
13 changes: 13 additions & 0 deletions ports/mesa/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"name": "mesa",
"version": "23.2.1",
"port-version": 1,
"description": "Mesa - The 3D Graphics Library",
"homepage": "https://www.mesa3d.org/",
"license": "MIT AND BSL-1.0 AND SGI-B-2.0",
Expand Down Expand Up @@ -127,6 +128,18 @@
"dependencies": [
"opengl"
]
},
"vulkan-drivers": {
"description": "Build Vulkan drivers applicable to the target",
"dependencies": [
"vulkan-headers",
{
"name": "glslang",
"features": [
"tools"
]
}
]
}
}
}

0 comments on commit d8670f1

Please sign in to comment.