编译tiff:arm64-linux-static报错 Could NOT find CMath (missing: CMath_pow)
编译tiff:arm64-linux-static报错 Could NOT find CMath (missing: CMath_pow)
使用vcpkg编译tiff静态库时(tiff:arm64-linux-static)可能会遇到报错:
Could NOT find CMath (missing: CMath_pow)
解决方法是修改vcpkg目录下的buildtrees/tiff/src/v4.7.1-dfffa27dcf/cmake/FindCMath.cmake
文件,将if(CMath_HAVE_LIBC_POW
所在行和后面两行,以及FIND_PACKAGE_HANDLE_STANDARD_ARGS
所在行注释掉,如下所示:
set(CMath_pow FALSE)
#if(CMath_HAVE_LIBC_POW OR CMath_HAVE_LIBM_POW)
# set(CMath_pow TRUE)
#endif()set(CMath_INCLUDE_DIRS)include(FindPackageHandleStandardArgs)
#FIND_PACKAGE_HANDLE_STANDARD_ARGS(CMath REQUIRED_VARS CMath_pow)
简评:CMath本来就就是C标准库,没有必要再显式链接CMath_pow。