The taglib package provides pkg-config files:

    find_package(PkgConfig)

    # For taglib
    pkg_check_modules(TAGLIB REQUIRED IMPORTED_TARGET taglib)
    target_link_libraries(main PRIVATE PkgConfig::TAGLIB)

    # For C bindings
    pkg_check_modules(TAGLIB_C REQUIRED IMPORTED_TARGET taglib_c)
    target_link_libraries(main PRIVATE PkgConfig::TAGLIB_C)
