libdeflate provides CMake targets: find_package(libdeflate CONFIG REQUIRED) target_link_libraries(main PRIVATE $,libdeflate::libdeflate_shared,libdeflate::libdeflate_static>)