Can't cross-compile on Linux to different architecture
When cross-compiling for different architectures (in this particular case aarch64) cmake fails during configuration: https://travis-ci.org/voidlinux/void-packages/jobs/360636991#L945
After looking around in code a bit I found this fix related to mingw:
at src/app/qt/CMakeLists.txt:196
if (WIN32)
string(REGEX MATCH "(i586-mingw32msvc-g\\+\\+|i686-w64-mingw32-g\\+\\+)"
_crossMingwMatch "${CMAKE_CXX_COMPILER}")
if (_crossMingwMatch)
# Avoid error "/usr/bin/ldd failed: 1" from GetPrerequisites.cmake:800
# when building a Windows package from Linux with CMake 3.5.
install(CODE "
set(gp_tool DO_NOT_USE)
")
endif (_crossMingwMatch)
endif (WIN32)
I was able to resolve it by explicitly passing a cmake configuration flag, -Dgp_tool=DO_NOT_USE, but this is just too hacky and it would be much nicer if this was officially supported upstream.
Imported from SourceForge, author: lahvuun