How can I merge multiple lists of files together with CMake?

The file (GLOB ...) command allows for specifying multiple globbing expressions:

file (GLOB files "path/to/files/*" "path/to/files2*")

Alternatively, use the list (APPEND ...) sub-command to merge lists, e.g.:

file (GLOB files "path/to/files/*")
file (GLOB files2 "path/to/files2*")
list (APPEND files ${files2})

I'd construct a list for each of the patterns and then concatenate the lists:

file(GLOB files1 "path/to/files1/*")
file(GLOB files2 "path/to/files2/*")
set(files ${files1} ${files2})