function(FilterPlatformPaths sourcesVar)
    if (IOS)
        list(FILTER ${sourcesVar} EXCLUDE REGEX ".*GLFW.*")
        list(FILTER ${sourcesVar} EXCLUDE REGEX ".*[\\/]Host[\\/]MacOS[\\/].*")
    else ()
        list(FILTER ${sourcesVar} EXCLUDE REGEX ".*[\\/]Host[\\/]iOS[\\/].*")
        list(FILTER ${sourcesVar} EXCLUDE REGEX ".*[\\/]AR[\\/]Provider[\\/]ArKit[\\/].*")
    endif ()
    if (NOT APPLE)
        list(FILTER ${sourcesVar} EXCLUDE REGEX ".*[\\/]Host[\\/]Apple[\\/].*")
        list(FILTER ${sourcesVar} EXCLUDE REGEX ".*[\\/]Host[\\/]MacOS[\\/].*")
    endif ()
    if (NOT LINUX)
        list(FILTER ${sourcesVar} EXCLUDE REGEX ".*[\\/]Host[\\/]Linux[\\/].*")
    endif ()
    if (NOT WIN32)
        list(FILTER ${sourcesVar} EXCLUDE REGEX ".*[\\/]Host[\\/]Windows[\\/].*")
    endif ()

    list(FILTER ${sourcesVar} EXCLUDE REGEX "main\.(m|mm|c|cpp)")

    set(${sourcesVar} ${${sourcesVar}} PARENT_SCOPE)
endfunction()
