INCLUDE(../../../cmake/macros.cmake)

SET(_RACE_FILES practice.xml quickrace.xml
           singleevent-36gp.xml
           singleevent-challenge.xml singleevent-endurance.xml
           singleevent-ls-gt1.xml singleevent-mp5.xml singleevent-mpa1.xml
           networkrace.xml netclient.xml netserver.xml netwatcher.xml
           championship.xml championship-24h.xml championship-supercars.xml championship-trb1.xml
           championship-36gp.xml championship-67gp.xml championship-ls-gt1.xml championship-mp1.xml championship-mp5.xml
           championship-mpa1.xml championship-mpa11.xml career-36GP.xml career-supercars.xml
           career_36GP.xmls career_MPA1.xmls
           career_supercars.xmls career_ls1.xmls)

# Using GLOB here because when building from less than the complete set of source tars,
# the build would fail because some of the files listed above will be missing.
FILE(GLOB _RACE_FILES *.xm*)

SD_INSTALL_FILES(DATA config/raceman USER config/raceman FILES ${_RACE_FILES})

SET(_EXTRA_FILES extra/skill.xml)

SD_INSTALL_FILES(DATA config/raceman/extra USER config/raceman/extra
                 FILES ${_EXTRA_FILES})

# Fictive = no-output target, for having source files available in IDEs.
ADD_CUSTOM_TARGET(raceman SOURCES ${_RACE_FILES} ${_EXTRA_FILES})

