I have a part of CMake code ( to generate documentation in doxygen )
which I want to use in many not related each other projects. What is
the best way to do this?
The best way is to separate the reusable code into a
.cmake module file and put a copy of this file in each project.
However, CMake already has a
FindDoxygen module, which may already do what you want.
Very thanks for Your answer. By the way I use Find Doxygen but setting up all variable for this module expands to dozen lines. I think using separate cmake file will be more readable.