I would also support the opinion that Erdogan used the EU integration process to selectively weaken the kemalist/military grip on Turkey's institutions. While you could point out that the EU were a 'useful idiot', IMHO there was never a realistic chance of Turkey joining the EU. The reasons are multifold, most important ones being the resistance of the EU population in major EU countries such as Germany, France and Poland. In that regard, I think, EU politics were not on an honest basis and just a game.
Those people are obviously not Turkish. The military, by its founding from Ataturk, gives ZERO damns about membership, in fact they were pretty much established to STOP various forms of state 'membership' including religious.