One of the nice feature of major warships is they have the ability to produce electricity on an industrial scale. And the lasers already being tested in the US Navy do not need a massive supply of power like older lasers. You can find plenty of reporting and video on the various US Navy laser programs, for example see below. Lasers are not the answer to all problems, but they are a potentially great solution to the cruise missile problem.
Exclusive: CNN witnesses US Navy's drone-killing laser
In the sometimes hostile waters of the Persian Gulf looms the US Navy's first -- in fact, the world's first -- active laser weapon.
www.cnn.com
First Combat Laser For Navy Warship: Lockheed HELIOS - Breaking Defense
WASHINGTON: By 2020, for the first time, the US Navy will put a lethal laser on a warship. “This is a very big deal,” said Mark Gunzinger of the Center for Strategic & Budgetary Assessments, a longtime advocate of lasers. “It is clear evidence of the progress that has been made over the last...
breakingdefense.com