我是ubuntu18. self.options[“OpenCV”].with_FFmpeg = True 关键是GCc版本需要conan支持,比如我的是: compiler=gcc compiler.version=7.5 此外还需要安装
我是ubuntu18.
self.options[“OpenCV”].with_FFmpeg = True
关键是GCc版本需要conan支持,比如我的是:
compiler=gcc
compiler.version=7.5
此外还需要安装系统所需库:
https://qq742971636.blog.csdn.net/article/details/132559789
甚至来说,可以装一些系统编译好的,免得没有系统文件:
sudo apt-get install build-essentialsudo apt install ffmpeg --fix-missingsudo apt-get install pkg-configsudo apt install libopencv-dev
conanfile.py
from conans import ConanFile, CMakeclass PhotoTranslateConan(ConanFile): name = "video_deidentification" license = "" url = "https://gitlab.upuphone.com/ai-group/client/sdk/public/computer_vision/video_deidentification.git" description = "video_deidentification" topics = ("video_deidentification") settings = "os", "compiler", "build_type", "arch" options = {"shared": [True, False], "fPIC": [True, False]} default_options = {"shared": True, "fPIC": True} generators = "cmake", "virtualenv" _cmake = None def requirements(self): self.requires("fmt/9.1.0") # spdlog需求 self.requires("JSONcpp/1.9.5") self.requires("spdlog/1.11.0") self.requires("eigen/3.3.9") # self.requires("gtest/cci.20210126") # self.requires("boost/1.70.0") # self.requires("cpp-Httplib/0.11.3") # self.requires("openssl/3.0.7") if self.settings.os != "Android": self.requires("opencv/4.5.5") def configure(self): if self.settings.os == "windows": del self.options.fPIC if self.settings.os == "Windows": self.options["opencv"].with_ffmpeg = False if self.settings.os == "linux": # print("######################", self.options["opencv"].with_ffmpeg) self.options["opencv"].with_ffmpeg = True self.options["opencv"].shared = False self.options["opencv"].contrib = False self.options["opencv"].contrib_freetype = False self.options["opencv"].with_gtk = False def build(self): cmake = self._configure_cmake() cmake.build() cmake.install() def _configure_cmake(self): if self._cmake: return self._cmake self._cmake = CMake(self) # 判断arch是否为armv7、x86 if self.settings.arch == "armv7" or self.settings.arch == "x86": self._cmake.definitions["USE_32BIT"] = True self._cmake.configure() return self._cmake
conan profile
[settings]os=Linuxos_build=Linuxarch=x86_64arch_build=x86_64compiler=gcccompiler.version=7.5compiler.libcxx=libstdc++11build_type=Release[options][build_requires][env]
编译完成:
来源地址:https://blog.csdn.net/x1131230123/article/details/132567254
--结束END--
本文标题: WSL Opencv with_ffmpeg conan1.60.0
本文链接: https://lsjlt.com/news/383057.html(转载时请注明来源链接)
有问题或投稿请发送至: 邮箱/279061341@qq.com QQ/279061341
2024-03-01
2024-03-01
2024-03-01
2024-03-01
2024-03-01
2024-02-29
2024-02-29
2024-02-29
2024-02-29
2024-02-29
回答
回答
回答
回答
回答
回答
回答
回答
回答
回答
0