title: Get CMake to execute a target in project before building a library
body: <p>I am using CMake to build my C++ project and it has multiple executables and a library (all part of same project).  All is working fine, however one of my executables is a code generator that creates some of the library classes. I have got all the generation working but can't figure out how to call this executable (codegen) just before the library is built. I am on Linux environment.  Hope someone can answer this.</p>