Skip to content

Generation of Visual Studio Projects

MaverickAl edited this page Apr 25, 2018 · 3 revisions

Visual Studio vcxproj project files are automatically generated.

Tools/build/generator.rb contains two tuples, one for engine static library projects and one for dll projects.

vs_project_tuples
vs_project_dll_tuples

It is assumed that all engine libraries will use the same basic settings (include directories, warning settings etc) and as such share common template files. Engine/Project.vcxproj.erb and Engine/Project.vcxproj.filters.erb

You can manually specify a template name for dll projects as they will likely require custom settings and names.

You must provide any new projects with their own unique id. Generated projects are placed in _build\Projects

You can manually add projects to your solution file as it is not automatically generated, however as the applications project file is you will need to be aware of this and add references manually to the main .vcxproj.erb with the following xml

<ProjectReference Include="$(USAGI_DIR)\_build\projects\Engine\PROJECT_NAME.vcxproj">
  <Project>{PROJECT_ID}</Project>
</ProjectReference>    

The project name and project id must match those in generator.rb

To generate the projects you should right click on ProjectGenerator in the solution and build (note due to build dependencies this currently may fail the first time). You will need to build it for the version of the game you wish to run (debug or release).

By default all cpp files will be picked up except those in directories which begin with _ e.g. _exclude includes the precompiled header file. Platform specific code is contained in these underscore pre-pended directories, the build system knows which directories each platform requires. You can adjust the files that will be compiled on a per platform basis by adding a .source.platform file (e.g. .sources.win)