-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathNppTreeSitter.vcxproj
More file actions
169 lines (154 loc) · 6.97 KB
/
Copy pathNppTreeSitter.vcxproj
File metadata and controls
169 lines (154 loc) · 6.97 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|x64">
<Configuration>Debug</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|x64">
<Configuration>Release</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|ARM64">
<Configuration>Debug</Configuration>
<Platform>ARM64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|ARM64">
<Configuration>Release</Configuration>
<Platform>ARM64</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<VCProjectVersion>17.0</VCProjectVersion>
<ProjectGuid>{B1A2C3D4-E5F6-7890-ABCD-EF1234567890}</ProjectGuid>
<RootNamespace>NppTreeSitter</RootNamespace>
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
<RepositoryUrl>https://bitbucket.org/Thorium/NppTreeSitter</RepositoryUrl>
<RepositoryType>git</RepositoryType>
<Authors>Tuomas Hietanen</Authors>
<PackageReadmeFile>README.md</PackageReadmeFile>
<PackageLicenseExpression>Unlicense</PackageLicenseExpression>
<Copyright>Unlicense - Public Domain</Copyright>
<PublishRepositoryUrl>true</PublishRepositoryUrl>
<Keyword>Win32Proj</Keyword>
</PropertyGroup>
<PropertyGroup>
<NppTreeSitterPreferredToolset Condition="Exists('$(VCTargetsPath)\Platforms\$(Platform)\PlatformToolsets\v145\Toolset.props')">v145</NppTreeSitterPreferredToolset>
<NppTreeSitterPreferredToolset Condition="'$(NppTreeSitterPreferredToolset)' == ''">v143</NppTreeSitterPreferredToolset>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<!-- Configuration property sheets -->
<PropertyGroup Condition="'$(Configuration)'=='Debug'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>$(NppTreeSitterPreferredToolset)</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)'=='Release'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>$(NppTreeSitterPreferredToolset)</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
<WholeProgramOptimization>true</WholeProgramOptimization>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<!--
Tree-sitter dependency: expects tree-sitter source at external\tree-sitter\
To set up:
cd TreeSitterLexer\external
git clone - -depth 1 https://github.com/tree-sitter/tree-sitter.git
Or add as a git submodule.
-->
<PropertyGroup>
<TreeSitterDir>$(MSBuildProjectDirectory)\external\tree-sitter</TreeSitterDir>
<ScintillaIncDir>$(MSBuildProjectDirectory)\external\scintilla\include</ScintillaIncDir>
</PropertyGroup>
<!-- Output paths -->
<PropertyGroup>
<OutDir>$(MSBuildProjectDirectory)\build\$(Platform)\$(Configuration)\</OutDir>
<IntDir>$(MSBuildProjectDirectory)\build\obj\$(Platform)\$(Configuration)\</IntDir>
<TargetName>TreeSitterLexer</TargetName>
</PropertyGroup>
<!-- Compiler settings (all configurations) -->
<ItemDefinitionGroup>
<ClCompile>
<AdditionalIncludeDirectories>
$(ScintillaIncDir);$(TreeSitterDir)\lib\include;$(TreeSitterDir)\lib\src;%(AdditionalIncludeDirectories)
</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;_WINDOWS;_USRDLL;TREESITTERLEXER_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<WarningLevel>Level3</WarningLevel>
<ConformanceMode>true</ConformanceMode>
<LanguageStandard>stdcpp17</LanguageStandard>
<DisableSpecificWarnings>4996;4267;4244;4101</DisableSpecificWarnings>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<AdditionalDependencies>comctl32.lib;version.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<!-- Debug-specific -->
<ItemDefinitionGroup Condition="'$(Configuration)'=='Debug'">
<ClCompile>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
</ClCompile>
</ItemDefinitionGroup>
<!-- Release-specific -->
<ItemDefinitionGroup Condition="'$(Configuration)'=='Release'">
<ClCompile>
<Optimization>MaxSpeed</Optimization>
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
</ClCompile>
<Link>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
</Link>
</ItemDefinitionGroup>
<!-- Source files -->
<ItemGroup>
<ClCompile Include="src\dllmain.cpp" />
<ClCompile Include="src\TreeSitterLexer.cpp" />
<!-- tree-sitter core: compile lib.c directly into our DLL -->
<ClCompile Include="$(TreeSitterDir)\lib\src\lib.c">
<PrecompiledHeader>NotUsing</PrecompiledHeader>
<CompileAs>CompileAsC</CompileAs>
</ClCompile>
</ItemGroup>
<!-- Header files -->
<ItemGroup>
<ClInclude Include="src\TreeSitterLexer.h" />
</ItemGroup>
<!-- Version resource -->
<ItemGroup>
<ResourceCompile Include="src\TreeSitterLexer.rc" />
</ItemGroup>
<!--
Post-build: copy DLL to a test deployment directory that mirrors
the Notepad++ plugin layout:
plugins\TreeSitterLexer\TreeSitterLexer.dll
plugins\TreeSitterLexer\TreeSitterGrammars\*.dll + *.scm
plugins\Config\TreeSitterLexer.xml
-->
<Target Name="DeployPlugin" AfterTargets="Build" Condition="Exists('$(TreeSitterDir)')">
<Message Text="Build complete: $(OutDir)$(TargetName).dll" Importance="high" />
<Message Text="To install in Notepad++:" Importance="high" />
<Message Text=" 1. Copy $(TargetName).dll to plugins\TreeSitterLexer\" Importance="high" />
<Message Text=" 2. Copy TreeSitterGrammars\ to plugins\TreeSitterLexer\" Importance="high" />
<Message Text=" 3. Copy config\TreeSitterLexer.xml to plugins\Config\" Importance="high" />
</Target>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
</Project>