VPP  0.7
A high-level modern C++ API for Vulkan
How to build and use VPP under Visual Studio

How to build and use VPP under Visual Studio

Build properties

Current (development) version of VPP supports Visual Studio 2015 and 2017, any edition.

You can build VPP under Visual Studio in two ways:

Both cases are very similar and both involves editing a file called vppBuild.props. The file is located in the following directory in VPP source distribution:

<VPP root>/build/<vsVVVV>/vppBuild.props

Default contents of this file are as follows:

<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ImportGroup Label="PropertySheets" />
<PropertyGroup Label="UserMacros">
<VPP_BUILD_BINDIR>../../../../bin/windows/$(Platform)/$(Configuration)/bin</VPP_BUILD_BINDIR>
<VPP_BUILD_LIBDIR>../../../../bin/windows/$(Platform)/$(Configuration)/lib</VPP_BUILD_LIBDIR>
<VPP_BUILD_INTDIR>../../../../bin/windows/$(Platform)/$(Configuration)/obj/$(ProjectName)</VPP_BUILD_INTDIR>
<VPP_VULKAN_DIR>$(VULKAN_PATH)</VPP_VULKAN_DIR>
<VPP_STATICLIB32_NAME>VppStatic32</VPP_STATICLIB32_NAME>
<VPP_SHAREDLIB32_NAME>VppShared32</VPP_SHAREDLIB32_NAME>
<VPP_STATICLIB64_NAME>VppStatic64</VPP_STATICLIB64_NAME>
<VPP_SHAREDLIB64_NAME>VppShared64</VPP_SHAREDLIB64_NAME>
</PropertyGroup>
<PropertyGroup />
<ItemDefinitionGroup />
<ItemGroup>
<BuildMacro Include="VPP_BUILD_BINDIR">
<Value>$(VPP_BUILD_BINDIR)</Value>
<EnvironmentVariable>true</EnvironmentVariable>
</BuildMacro>
<BuildMacro Include="VPP_BUILD_LIBDIR">
<Value>$(VPP_BUILD_LIBDIR)</Value>
<EnvironmentVariable>true</EnvironmentVariable>
</BuildMacro>
<BuildMacro Include="VPP_BUILD_INTDIR">
<Value>$(VPP_BUILD_INTDIR)</Value>
<EnvironmentVariable>true</EnvironmentVariable>
</BuildMacro>
<BuildMacro Include="VPP_VULKAN_DIR">
<Value>$(VPP_VULKAN_DIR)</Value>
<EnvironmentVariable>true</EnvironmentVariable>
</BuildMacro>
</ItemGroup>
</Project>

The general rule is that the vppBuild.props file should be always in the same directory as the solution (.sln) file you are building VPP from. In case of standalone build, the default directory is the proper one. In case of your own solution, copy the file to the place where the solution file exists and edit it there.

Configurable macros are located in the first part of the file. Currently there are the following macros:

Relative paths are calculated with respect to the location of VPP project file, which is appripriate to standalone build. If you integrate VPP into your own project and want to specify output path relatively to it, use Visual Studio macros (e.g. like this:

<VPP_BUILD_BINDIR>$(SolutionDir)/../build/vs2015/$(Platform)/$(Configuration)/bin</VPP_BUILD_BINDIR>
<VPP_BUILD_LIBDIR>$(SolutionDir)/../build/vs2015/$(Platform)/$(Configuration)/lib</VPP_BUILD_LIBDIR>
<VPP_BUILD_INTDIR>$(SolutionDir)/../build/vs2015/$(Platform)/$(Configuration)/obj/$(ProjectName)</VPP_BUILD_INTDIR>

By default VPP finds Vulkan by means of VULKAN_PATH environment variable, but you can specify any directory (or other environment variable name) here.

Also the names of final files are configurable. By default, names of generated files will be as follows: VppStatic32.lib, VppStatic64.lib, VppShared32.dll, VppShared32.lib, VppShared64.dll, VppShared64.lib. The .lib files will be used as inputs to linker. You can either specify them manually in Additional Dependencies field, or use Link Library Dependencies option.

Configurations and platforms

VPP provides the following configurations under Visual Studio: Debug, DebugDLL, Release, ReleaseDLL. Both 32-bit and 64-bit variants are supported.

Project file

The project file for inclusion in your own solutions is located in the following directory:

<VPP root>\code\vpp\build\<vsVVVV>\vpp.vcxproj