It is very common to dedicate a Sefer to an individual or a family. Probably, today, the best known Sefer dedication , is The Schottenstien Shas.
This custom goes back to the times of the Gaonim, & maybe even earlier.
1)R. Amram Gaon dedicated his “Seder Hatefilos” to R. Yitzchok Bar Shimon who sent him ten Golden coins for the Yeshiva in Mechasya.
2)R. Menachem b. Zerach dedicated his Sefer “Tzeidah Laderech” to Don Shmuel Abarbanel.
3)R. Ovadyah Seforno dedicated his Sefer “Ohr Olam” to King Henri 2nd (France)
4)R.Dovid di Poumis dedicated his Sefer “Tzemach Dovid” to Pope Sixtus 5th
5)R.Menashe b Yisroel dedicated his Sefer “Mikveh Yisroel”(Hope of Israel) to The British Parliament , Courts of England & Prime Minister Oliver Cromwell.
6)R. Mordechai Gimpel Halevi dedicated his Sefer “Tochachas Megillah” to the
President of Switzerland.
7)Efraim Pinner* dedicated his “GermanTranslation on Meseches Brochos ”
to Tsar Nicholas 1st (Russia)
*The Chasam Sofer pulled back the Haskama he gave him.
I wrote that R. Mordechai Gimpel dedicated his Sefer "Tochachas Megilah"
to the President of Switzerland. I took this information from the Otzar Yisrael.
(Eisenstein)His information is incorrect. He actually dedicated the Sefer to