Open KkemChen opened 1 month ago
Bot detected the issue body's language is not English, translate it automatically.
Title: opencv: Use vcpkg::opencv under win. vcpkg has been successfully installed, but xmake cannot check.
add_packages 要跟 add_requires 的包名一致 add_packages("vcpkg::opencv[contrib,freetype]")
,否则关联不上。。如果你 add_packages 不想写这么长,那就设置 alias
add_requires("vcpkg::opencv[contrib,freetype]", {alias = "opencv"})
add_packages 要跟 add_requires 的包名一致
add_packages("vcpkg::opencv[contrib,freetype]")
,否则关联不上。。如果你 add_packages 不想写这么长,那就设置 aliasadd_requires("vcpkg::opencv[contrib,freetype]", {alias = "opencv"})
他这里好像都没有到 add_packages的阶段,还在install的时候就寄了
那就自己调下这里,https://github.com/xmake-io/xmake/blob/dev/xmake/modules/package/manager/vcpkg/find_package.lua
fetch 没找到安装后的包而已。
Bot detected the issue body's language is not English, translate it automatically.
Then adjust it here yourself, https://github.com/xmake-io/xmake/blob/dev/xmake/modules/package/manager/vcpkg/find_package.lua
fetch did not find the installed package.
刚尝试调试了一下,发现xmake读取这个 infofile里的内容,但是里面只有这些内容,并没有 include,lib等文件夹。 不知道是不是新版的vcpkg做了改动
x64-windows-static/
x64-windows-static/share/
x64-windows-static/share/opencv/
x64-windows-static/share/opencv/OpenCVConfig-version.cmake
x64-windows-static/share/opencv/OpenCVConfig.cmake
x64-windows-static/share/opencv/OpenCVModules-debug.cmake
x64-windows-static/share/opencv/OpenCVModules-release.cmake
x64-windows-static/share/opencv/OpenCVModules.cmake
x64-windows-static/share/opencv/vcpkg.spdx.json
x64-windows-static/share/opencv/vcpkg_abi_info.txt
opencv_4.8.0_x64-windows-static.list 里面没有 opencv4_4.8.0_x64-windows-static.list 这个里面倒是有 include,lib这些
Bot detected the issue body's language is not English, translate it automatically.
There is no opencv_4.8.0_x64-windows-static.list opencv4_4.8.0_x64-windows-static.list contains include, lib, etc.
那这种目前解析不了,先得确认库和头文件路径在哪。啥也没有 就没办法了。。
所以建议用 xmake-repo 的 opencv 包
Bot detected the issue body's language is not English, translate it automatically.
This kind of problem cannot be parsed at present. You must first confirm where the library and header file paths are. If there is nothing, there is nothing we can do. .
Therefore, it is recommended to use the opencv package of xmake-repo
嗯,我改成 add_requires("vcpkg::opencv4[contrib,freetype]", {alias = "opencv"}),动态库倒是可以用,静态库好像是没有级联依赖 导致报一堆像libpng之类的其他依赖库未定义的错误
嗯,我改成 add_requires("vcpkg::opencv4[contrib,freetype]", {alias = "opencv"}),动态库倒是可以用,静态库好像是没有级联依赖 导致报一堆像libpng之类的其他依赖库未定义的错误
目前 vcpkg/conan 的级联依赖需要一个个声明,动态库自然都包含进去,而静态库需要手动链接
只有 xmake-repo 仓库的包才支持级联依赖。。三方包不支持
Bot detected the issue body's language is not English, translate it automatically.
Only packages in the xmake-repo warehouse support cascading dependencies. . Third-party packages are not supported
Xmake 版本
2.9.5
操作系统版本和架构
Windows11
描述问题
如题
期待的结果
解决
工程配置
附加信息和错误日志