France did it in its own way. They didn't hesitate to ally themselves with the Protestants in the Thirty Years' War, and with the Turks in their wars against other Catholic nations.
Had it not been for France, the Protestants would have been defeated and the destruction of Christianity would not have happened.
It's in Westphalia where Catholicism and Protestantism are put on equality, leaving each monarch to impose the religion he prefer. Once the monarchies were defeated by the revolutions (French Revolution, American Revolution) the next logical step was secularism, that each one professes the religion that he wants.