A pyrimidone derivative represented by formula (I) or a salt thereof, or a solvate thereof or a hydrate thereof:wherein X, R1, R2, R3, R4, and m are defined in the disclosure. Also disclosed are methods of preparing the compounds of formula (I), intermediates thereof and their use in therapeutics.