0

I have a folder structure like this:

chapters
├── a.tex
├── folder1
│   ├── b.tex
│   ├── c.tex
├── d.tex
└── folder2
    ├── e.tex
    ├── f.tex
...

I'm basically modifying an existing makefile, how can I load all .tex files in the set parts without hardcoding all files like this:

set(parts
    chapters/a.tex
    chapters/d.tex
    chapters/folder1/b.tex
    chapters/folder1/c.tex
    ...
)

I'm using the parts set later like this:

add_latex_document(output.tex
    INPUTS ${parts}
)
jww
  • 97,681
  • 90
  • 411
  • 885
Natjo
  • 2,005
  • 29
  • 75
  • Possible duplicate of [Is it better to specify source files with GLOB or each file individually in CMake?](https://stackoverflow.com/questions/1027247/is-it-better-to-specify-source-files-with-glob-or-each-file-individually-in-cmak) – Florian Nov 28 '17 at 13:52
  • What is wrong with [file(GLOB_RECURSE)](https://cmake.org/cmake/help/v3.7/command/file.html), like [here](https://stackoverflow.com/questions/17934024/multiple-source-directories-for-one-executable-with-cmake)? – Tsyvarev Nov 28 '17 at 13:53
  • Possible duplicate of [Recursive CMake search for header and source files](https://stackoverflow.com/questions/17653738/recursive-cmake-search-for-header-and-source-files) – Kamiccolo Dec 21 '17 at 12:23

0 Answers0