turing machines – Is there a TM that halts iff P = NP?

Is there a Turing machine that halts iff P = NP? There are Turing machines that halt iff the Goldbach conjecture is false, or the Riemann hypothesis is false. How about the P vs. NP question? This is an expressiveness question, but I have not seen such a construction before.