The lands that today comprise Croatia were part of the Austro-Hungarian Empire until the close of World War I .