… is from Voltaire, as quoted on pages 192-193 of Daniel Boorstin’s 1998 book, The Seekers  (emphasis supplied by Boorstin):
Of those who have commanded battalions and squadrons, only the names remain. The human race has nothing to show for a hundred battles that have been waged. But the great men I speak to you about have prepared pure and lasting pleasures for men yet to be born. A canal lock uniting two seas, a painting by Poussin, a beautiful tragedy, a newly discovered truth – these are things a thousand times more precious than all the annals of the court or all the accounts of military campaigns. You know that, with me, great men come first and heroes last.
I call great men all those who have excelled in creating what is useful or agreeable. The plunderers of the provinces are mere heroes.