liblzma is compatible with built-in CMake targets:

    find_package(LibLZMA REQUIRED)
    target_link_libraries(main PRIVATE LibLZMA::LibLZMA)

liblzma provides CMake targets:

    find_package(liblzma CONFIG REQUIRED)
    target_link_libraries(main PRIVATE liblzma::liblzma)
