Use regex to find/replace: __(cm.*_h) \1 Then fix QCMake.h by hand.
When CMAKE_USE_SYSTEM_LIBARCHIVE is on we must include the system libarchive headers to match the library that will be linked.