How do I generate multiple project files when using BuildConfiguration.xml?

I used to generate my project files with

./GenerateProjectFiles.sh <PATH>/<PROJECT>.uproject -game -CMakefile -Makefile

and that would give me both a CMakeLists.txt and a Makefile.
This now produces the following warning:

WARNING: Project file formats specified via the command line will be ignored when generating
         project files from the editor and other engine tools.
         
         Consider setting your desired IDE from the editor preferences window, or modify your
         BuildConfiguration.xml file with:
         
         <?xml version="1.0" encoding="utf-8" ?>
         <Configuration xmlns="https://www.unrealengine.com/BuildConfiguration">
           <ProjectFileGenerator>
             <Format>Make</Format>
             <Format>CMake</Format>
           </ProjectFileGenerator>
         </Configuration>

When I add the two Format lines to my BuildConfiguration.xml i get the following warning:

warning: Element 'https://www.unrealengine.com/BuildConfiguration:Format' cannot appear more than once if content model type is "all".

What does “content model type ‘all’” mean? What else could it be? What should it be? Where can I change it?

As expected, based on the error message, only one of the two project files is generated.

I also tried to put the two format in the same Format tag as a comma-separated list. That removed the warning but I still only get one project file.

What is the correct way to get both a CMakeLists.txt and a Makefile when using BuildConfiguration.xml?

2 Likes

Same problem here. Looking at the docs, the “format” tag takes a “list” of formats… but the docs don’t mention any kind of separator to build a list. No idea what to do with this :frowning: Thus far, I have been manually running “generateprojectfiles.sh” with the -qmake and -make flags to generate for my projects… sure would be nice to have that set system-wide.