For example, Mozart wrote The Turkish March. Haydn also wrote a Turkish March. Beethoven apparently did as well, although that was in 1809.
The Turkish march or Rondo alla turca (meaning "in a Turkish style", not "Turkish") is a march composed in a Turkish style and it's not strictly referred to Turkey, but to the Turquerie, an Orientalist fashion widespread in 16th century Western Europe. A Turkish march is usually composed with arabesques, particular scales and non-Western rhythmic patterns.
See also the character of the Turk in opera (e.g. Handel's Tamerlano or Rossini's Il turco in Italia).
Note that ethnomusicology won't be developed until mid-1900. When you listen to Brahms' Hungarian Dances you are not listening to something related to Hungarian style/music/culture/tradition/...
(Sorry for my English)