Files
scons-plus-plus/util/vs_project_template/vs_project_files/target.vcxproj.jinja

67 lines
3.2 KiB
Django/Jinja

{%- set ms_cxx_standard = {
'c++14': 'c++14',
'c++17': 'c++17',
'c++20': 'c++20',
'c++23': 'c++latest',
'c++26': 'c++latest'}[project.cxx_standard] | default('c++14')
-%}
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="17.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
{%- for build_type in project.build_types %}
{% set build_type_name = build_type | capitalize -%}
<ProjectConfiguration Include="{{ build_type_name }}|x64">
<Configuration>{{ build_type_name }}</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
{%- endfor %}
</ItemGroup>
<PropertyGroup Label="Globals">
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<ProjectGuid>{{ generate_uuid('target_' + target.name, True) }}</ProjectGuid>
<ProjectName>{{ target.name }}</ProjectName>
<SConsCommandLine>{{ scons_exe }}</SConsCommandLine>
</PropertyGroup>
{%- for build_type in project.build_types %}
{% set build_type_name = build_type | capitalize -%}
<PropertyGroup Condition="'$(Configuration)'=='{{ build_type_name }}'">
<TargetPath>$(SolutionDir){{ target.filename(build_type) }}</TargetPath>
<SPPBuildType>{{ build_type }}</SPPBuildType>
<SPPTargetType>{{ target.type }}</SPPTargetType>
</PropertyGroup>
{%- endfor %}
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Label="Configuration">
<ConfigurationType>Makefile</ConfigurationType>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ItemGroup>
{%- for source_file in get_sources(target) %}
<ClCompile Include="$(SolutionDir){{ source_file }}" />
{%- endfor %}
</ItemGroup>
<ItemGroup>
{%- for header_file in get_headers('private\\' + target.module.folder) %}
<ClInclude Include="$(SolutionDir){{ header_file }}" />
{%- endfor %}
{%- for header_file in get_headers('public\\' + target.module.folder) %}
<ClInclude Include="$(SolutionDir){{ header_file }}" />
{%- endfor %}
</ItemGroup>
<ItemGroup>
<Content Include="$(SolutionDir)private\{{ target.module.folder }}\SModule" />
</ItemGroup>
{%- for build_type in project.build_types %}
{% set build_type_name = build_type | capitalize -%}
<ItemDefinitionGroup Condition="'$(Configuration)'=='{{ build_type_name }}'">
<ClCompile>
<PreprocessorDefinitions>{{ get_target_property(build_type, target.name, 'CPPDEFINES') | join(';') }};%(PreprocessorDefinitions);</PreprocessorDefinitions>
<GenerateDebugInformation>{{ build_type != 'release' and 'true' or 'false' }}</GenerateDebugInformation>
<AdditionalIncludeDirectories>{{ get_target_property(build_type, target.name, 'CPPPATH') | join(';') }};%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<MsExtensions>false</MsExtensions>
<AdditionalOptions>{{ get_target_property(build_type, target.name, 'CCFLAGS') | join(' ') }}</AdditionalOptions> {# + get_target_property(build_type, target.name, 'CXXFLAGS')) #}
</ClCompile>
</ItemDefinitionGroup>
{%- endfor %}
<Import Project="$(SolutionDir)external\scons-plus-plus\contrib\vs\spp.targets" />
</Project>