Generating files

How to write Cmake file, where
before building whole is build tblgen program. Next are generated files *.inc (if not exists), next is build whole.

I found https://crascit.com/2017/04/18/generated-sources-in-cmake-builds/