Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions recipes/libvpx/all/conandata.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,9 @@ sources:
"1.16.0":
url: "https://github.com/webmproject/libvpx/archive/refs/tags/v1.16.0.tar.gz"
sha256: "7a479a3c66b9f5d5542a4c6a1b7d3768a983b1e5c14c60a9396edc9b649e015c"
patches:
"1.16.0":
- "patch_description": "add support for msvc v145 / VS 2026"
"patch_file": "patches/vs2026.patch"
"patch_source": "https://chromium-review.googlesource.com/c/webm/libvpx/+/7602275"
"patch_type": "portability"
9 changes: 7 additions & 2 deletions recipes/libvpx/all/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from conan.tools.apple import is_apple_os, fix_apple_shared_install_name
from conan.tools.build import stdcpp_library
from conan.tools.env import Environment, VirtualBuildEnv
from conan.tools.files import copy, get, rmdir, replace_in_file, rename
from conan.tools.files import apply_conandata_patches, copy, export_conandata_patches, get, rename, replace_in_file, rmdir
from conan.tools.gnu import Autotools, AutotoolsToolchain
from conan.tools.layout import basic_layout
from conan.tools.microsoft import is_msvc, is_msvc_static_runtime, msvc_runtime_flag
Expand Down Expand Up @@ -42,6 +42,9 @@ class LibVPXConan(ConanFile):
def _settings_build(self):
return getattr(self, "settings_build", self.settings)

def export_sources(self):
export_conandata_patches(self)

def config_options(self):
if self.settings.os == 'Windows':
del self.options.fPIC
Expand Down Expand Up @@ -105,7 +108,7 @@ def _target_name(self):
compiler = f"vs{vc_version}"
elif is_msvc(self):
vc_version = str(self.settings.compiler.version)
vc_version = {"170": "11", "180": "12", "190": "14", "191": "15", "192": "16", "193": "17", "194": "17"}[vc_version]
vc_version = {"170": "11", "180": "12", "190": "14", "191": "15", "192": "16", "193": "17", "194": "17", "195": "18"}[vc_version]
compiler = f"vs{vc_version}"
elif self.settings.compiler in ["gcc", "clang", "apple-clang"]:
compiler = 'gcc'
Expand Down Expand Up @@ -188,6 +191,8 @@ def generate(self):
tc.generate(env)

def _patch_sources(self):
apply_conandata_patches(self)

# Disable LTO for Visual Studio when CFLAGS doesn't contain -GL
if is_msvc(self):
cflags = " ".join(self.conf.get("tools.build:cflags", default=[], check_type=list))
Expand Down
103 changes: 103 additions & 0 deletions recipes/libvpx/all/patches/vs2026.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
From 6845d7229e1b1d9315f506a7c559ea1003d832ab Mon Sep 17 00:00:00 2001
From: Andrey Filipenkov <kambalaDecapitator@gmail.com>
Date: Tue, 24 Feb 2026 14:58:59 +0300
Subject: [PATCH] add support for msvc v145 / VS 2026

Change-Id: I24769c0794a9d82bc01c6c3998c155dc95b8377b
---

diff --git a/README b/README
index e47aa20..ed27669 100644
--- a/README
+++ b/README
@@ -78,6 +78,8 @@
arm64-win64-vs16-clangcl
arm64-win64-vs17
arm64-win64-vs17-clangcl
+ arm64-win64-vs18
+ arm64-win64-vs18-clangcl
armv7-android-gcc
armv7-darwin-gcc
armv7-linux-rvct
@@ -146,6 +148,7 @@
x86_64-win64-vs15
x86_64-win64-vs16
x86_64-win64-vs17
+ x86_64-win64-vs18
generic-gnu

The generic-gnu target, in conjunction with the CROSS environment variable,
diff --git a/build/make/gen_msvs_sln.sh b/build/make/gen_msvs_sln.sh
index 0b31285..29eab75 100755
--- a/build/make/gen_msvs_sln.sh
+++ b/build/make/gen_msvs_sln.sh
@@ -25,7 +25,7 @@
Options:
--help Print this message
--out=outfile Redirect output to a file
- --ver=version Version (14-17) of visual studio to generate for
+ --ver=version Version (14-18) of visual studio to generate for
--target=isa-os-cc Target specifier
EOF
exit 1
@@ -220,6 +220,7 @@
15) vs_year=2017 ;;
16) vs_year=2019 ;;
17) vs_year=2022 ;;
+ 18) vs_year=2026 ;;
*) die Unrecognized Visual Studio Version in $opt ;;
esac
;;
@@ -233,7 +234,7 @@
outfile=${outfile:-/dev/stdout}
mkoutfile=${mkoutfile:-/dev/stdout}
case "${vs_ver}" in
- 1[4-7])
+ 1[4-8])
# VS has used Format Version 12.00 continuously since vs11.
sln_vers="12.00"
sln_vers_str="Visual Studio ${vs_year}"
diff --git a/build/make/gen_msvs_vcxproj.sh b/build/make/gen_msvs_vcxproj.sh
index 1e1db05..f711091 100755
--- a/build/make/gen_msvs_vcxproj.sh
+++ b/build/make/gen_msvs_vcxproj.sh
@@ -34,7 +34,7 @@
--name=project_name Name of the project (required)
--proj-guid=GUID GUID to use for the project
--module-def=filename File containing export definitions (for DLLs)
- --ver=version Version (14-16) of visual studio to generate for
+ --ver=version Version (14-18) of visual studio to generate for
--src-path-bare=dir Path to root of source tree
-Ipath/to/include Additional include directories
-DFLAG[=value] Preprocessor macros to define
@@ -180,7 +180,7 @@
--ver=*)
vs_ver="$optval"
case "$optval" in
- 1[4-7])
+ 1[4-8])
;;
*) die Unrecognized Visual Studio Version in $opt
;;
@@ -364,6 +364,9 @@
if [ "$vs_ver" = "17" ]; then
tag_content PlatformToolset v143
fi
+ if [ "$vs_ver" = "18" ]; then
+ tag_content PlatformToolset v145
+ fi
fi
tag_content CharacterSet Unicode
if [ "$config" = "Release" ]; then
diff --git a/configure b/configure
index f7225f0..57efa77 100755
--- a/configure
+++ b/configure
@@ -180,6 +180,7 @@
all_platforms="${all_platforms} x86_64-win64-vs15"
all_platforms="${all_platforms} x86_64-win64-vs16"
all_platforms="${all_platforms} x86_64-win64-vs17"
+all_platforms="${all_platforms} x86_64-win64-vs18"
all_platforms="${all_platforms} generic-gnu"

# all_targets is a list of all targets that can be configured