find_package(PkgConfig): support windows cross compile on arm64 platform
I want to build a project to Windows ARM64
platform by using vcpkg+cmake
But It uses find_package(PkgConfig) REQUIRED
, then i got an error:
Could NOT find PkgConfig (missing: PKG_CONFIG_EXECUTABLE)
Reason given by package: The command
"D:/vcpkg/installed/arm64-windows/tools/pkgconf/pkgconf.exe" --version
failed with output:
stderr:
result:
then I checked https://gitlab.kitware.com/cmake/cmake/-/blob/master/Modules/FindPkgConfig.cmake#L73
if (PKG_CONFIG_EXECUTABLE)
execute_process(COMMAND ${PKG_CONFIG_EXECUTABLE} ${PKG_CONFIG_ARGN} --version
OUTPUT_VARIABLE PKG_CONFIG_VERSION_STRING OUTPUT_STRIP_TRAILING_WHITESPACE
ERROR_VARIABLE _PKG_CONFIG_VERSION_ERROR ERROR_STRIP_TRAILING_WHITESPACE
RESULT_VARIABLE _PKG_CONFIG_VERSION_RESULT
)
It looks like pkgconf need run to get version, but It's cross compile, my platform is just x86_64
but cmake want to exec pkgconf arm64version,so it throw an error.
shoule we have another method to get pkgconf version without run by it self?