how to link .cmake files with Unreal Engine?

You might find “PreBuildSteps” in your project or plugin file useful. You can run arbitrary batch commands before UBT compiles your project. In our plugin we check for a build.bat file’s existence, and run it if it’s there. Note you have to clean/rebuild to get changes to the PreBuildSteps to be recognized, which is why we call a .bat file (which can change) rather than just writing the commands out in PreBuildSteps.