Skip to content

Commit 5b61d99

Browse files
authored
Fixes to conan build for windows. (#117)
(cherry picked from commit 562be7c) Signed-off-by: Sam.Richards@taurich.org <Sam.Richards@taurich.org>
1 parent 25812a7 commit 5b61d99

File tree

2 files changed

+11
-4
lines changed

2 files changed

+11
-4
lines changed

conan/recipes/libvmaf/all/conanfile.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,8 @@ def generate(self):
3838

3939
def build_requirements(self):
4040
self.tool_requires("meson/1.6.0")
41-
if self.settings.arch in ["x86", "x86_64"]:
42-
self.tool_requires("nasm/2.16.01")
41+
#if self.settings.arch in ["x86", "x86_64"]:
42+
# self.tool_requires("nasm/2.16.01")
4343

4444
def build(self):
4545
meson = Meson(self)
@@ -54,9 +54,13 @@ def package(self):
5454
def package_info(self):
5555
self.cpp_info.libs = ["vmaf"]
5656
self.cpp_info.includedirs = ["include", os.path.join("include", "libvmaf")]
57-
if self.settings.os in ["Linux", "FreeBSD"]:
57+
if self.settings.os == "Windows":
58+
# MinGW requires explicit linking of the C++ standard library and math library
59+
self.cpp_info.system_libs.extend(["m", "stdc++"])
60+
elif self.settings.os in ["Linux", "FreeBSD"]:
5861
self.cpp_info.system_libs.extend(["m", "stdc++"])
5962
elif self.settings.os == "Macos":
6063
self.cpp_info.system_libs.append("c++")
6164
# This ensures FFmpeg's ./configure finds it easily
6265
self.cpp_info.set_property("pkg_config_name", "libvmaf")
66+
self.cpp_info.set_property("cmake_file_name", "libvmaf")

conan/windows-setup.sh

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
pacman -S --noconfirm mingw-w64-x86_64-gdb mingw-w64-x86_64-make
2-
pacman -S --noconfirm mingw-w64-x86_64-python-pip mingw-w64-x86_64-python-ninja
2+
pacman -S --noconfirm mingw-w64-x86_64-python-pip mingw-w64-x86_64-ninja
33
pacman -S --noconfirm mingw-w64-x86_64-nasm mingw-w64-x86_64-yasm
44
pacman -S --noconfirm base-devel
5+
pacman -S --needed mingw-w64-x86_64-gcc mingw-w64-x86_64-cmake
6+
export CONAN_HOME="/c/.c2"
7+
58
pip install conan
69
cd recipes/ffmpeg/all
710
conan export . --name ffmpeg --version 8.1

0 commit comments

Comments
 (0)