CPackDeb fails if crosscompiling
Hi All,
I'm trying to create a deb package of an app that I'm crosscompiling. I would like to have an standard deb package and a debug companion package, so I'm using CPACK_DEBIAN_DEBUGINFO_PACKAGE.
When I set said variable to ON
, the creation of the debug package fails since it tries to use the x86_64
version of objcopy
instead of the one from my toolchain.
I tracked it down to the CPackDeb.cmake
module, in this line where find_program(objcopy ...)
is called.
https://android.googlesource.com/platform/external/cmake/+/upstream-release/Modules/Internal/CPack/CPackDeb.cmake#202
I changed that line on my local install to find_program(OBJCOPY_EXECUTABLE NAMES arm-oe-linux-gnueabi-objcopy)
which seems to work. Of course this is not a fix, it was a quick hack to check if that was enough.
I'm not sure what would be the real fix here.
Thanks.
P.S. This is on CMake 3.18.