Use regex to find/replace: __(cm.*_h) \1 Then fix QCMake.h by hand.
Build liblzma as part of CMake or find one on the system. Modify our port of libarchive to use the liblzma configured for use with CMake.