project(fixtures)

# Install FixturesMap.xml and all subdirectories (except ./scripts and .)
file(GLOB FILES_AND_DIRECTORIES RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/*)
list(FILTER FILES_AND_DIRECTORIES EXCLUDE REGEX "^scripts$")
list(REMOVE_ITEM FILES_AND_DIRECTORIES ".")

foreach(FILE_AND_DIRECTORY ${FILES_AND_DIRECTORIES})
    if(IS_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/${FILE_AND_DIRECTORY}")
        install(DIRECTORY ${FILE_AND_DIRECTORY} DESTINATION ${INSTALLROOT}/${FIXTUREDIR})
    endif()
endforeach()

install(FILES FixturesMap.xml DESTINATION ${INSTALLROOT}/${FIXTUREDIR})