# List a CMake file

Does anyone have/know of a style file for the listings package which would enable the correct syntax highlighting of cmake files in LaTeX?

-
The minted manual says it supports all languages that Pygments does, which includes CMake. I know this doesn't answer the question, just pointing out an alternative. –  Psirus Jan 11 at 15:14
As @Psirus mentioned, you can try minted. If you are not satisfied and want to try it out with listings then try to copy the style of the one minted outputs into your listings cmake language environment with your own modifications. –  hpesoj626 Jan 12 at 3:33
@Psirus: I think you comment is also an answer. Of course an alternative one. –  Marco Daniel Mar 9 at 17:52
@MarcoDaniel I've added an alternative answer. –  Psirus Mar 10 at 17:04
@Psirus: +1 ;-) –  Marco Daniel Mar 10 at 17:05

This does not answer your question specifically, but it is possible to pretty print CMake lists using the minted package. Here an example using the CMakeLists.txt from the Lua Programming Language.

\documentclass{scrartcl}

\usepackage{minted}

\begin{document}
\inputminted{cmake}{CMakeLists.txt}
\end{document}


-