According to prime ministry sources, the closed-door meeting between Davutoglu and Rouhani lasted about two hours on Friday.
The two leaders discussed bilateral relations, regional issues and the 13th Organization of Islamic Cooperation (OIC) summit in Istanbul which ended on Friday.
The sources said Davutoglu reiterated Turkey's resolve over fighting against the PKK, PYD, Daesh and PJAK -- the PKK cover name in Iran.
Rouhani said that Daesh, the PKK and its extensions were the common enemy of Turkey and Iran.
The PKK - listed as a terrorist organization by Turkey, the U.S. and EU - resumed its 30-year armed campaign against the Turkish state in July.
The prime ministry sources said that the two talked over the regional issues especially about the solution of Syrian crisis.
Syria has been locked in a vicious civil war since early 2011, when the Bashar al-Assad regime cracked down on pro-democracy protests. Since then, more than 250,000 people have been killed and more than 10 million displaced, according to the UN.
Davutoglu and Rouhani also agreed to improve economic cooperation between the two countries.