我正在使用 conan 包管理器在交叉编译设置中构建 freetype 2.13.2(以及其他依赖项)(在 Linux 主机上使用 mingw32)。
我收到以下错误消息
../src/meson.build:239:11: ERROR: Could not find Windows resource compiler
据我了解,介子寻找名为
windres
的二进制文件,而我的二进制文件名为 x86_64-w64-mingw32-windres
。
我如何告诉介子(通过柯南)我的windres二进制文件的名称?
我的柯南命令行是
conan install .. -pr:b=default -pr:h=windows-cross --build=missing
$ cat ~/.conan/profiles/default
[settings]
os=Linux
os_build=Linux
arch=x86_64
arch_build=x86_64
compiler=gcc
compiler.version=11
compiler.libcxx=libstdc++11
build_type=Release
[options]
[build_requires]
[env]
$ cat ~/.conan/profiles/windows-cross
[settings]
os=Windows
os_build=Linux
arch=x86_64
arch_build=x86_64
compiler=gcc
compiler.version=10
compiler.libcxx=libstdc++11
build_type=Release
[env]
CONAN_CMAKE_TOOLCHAIN_FILE=/home/per/mingw-w64-x86_64.cmake
CC=x86_64-w64-mingw32-gcc
CXX=x86_64-w64-mingw32-g++
AR=x86_64-w64-mingw32-ar
AS=x86_64-w64-mingw32-as
RANLIB=x86_64-w64-mingw32-ranlib
STRIP=x86_64-w64-mingw32-strip
RC=x86_64-w64-mingw32-windres
CONAN_CMAKE_GENERATOR=MinGW Makefiles
$ cat /home/per/mingw-w64-x86_64.cmake
set(CMAKE_SYSTEM_NAME Windows)
set(TOOLCHAIN_PREFIX x86_64-w64-mingw32)
# cross compilers to use for C, C++ and Fortran
set(CMAKE_C_COMPILER ${TOOLCHAIN_PREFIX}-gcc)
set(CMAKE_CXX_COMPILER ${TOOLCHAIN_PREFIX}-g++)
set(CMAKE_Fortran_COMPILER ${TOOLCHAIN_PREFIX}-gfortran)
set(CMAKE_RC_COMPILER ${TOOLCHAIN_PREFIX}-windres)
# target environment on the build host system
set(CMAKE_FIND_ROOT_PATH /usr/${TOOLCHAIN_PREFIX})
# modify default behavior of FIND_XXX() commands
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)