Skip to content

Commit f071ced

Browse files
committed
xrCore: minor project file refactoring
Will correctly copy only needed files now
1 parent d4e216e commit f071ced

File tree

1 file changed

+66
-42
lines changed

1 file changed

+66
-42
lines changed

src/xrCore/xrCore.vcxproj

Lines changed: 66 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -109,21 +109,24 @@
109109
<Link>
110110
<AdditionalDependencies>PowrProf.lib;DbgHelp.lib;%(AdditionalDependencies)</AdditionalDependencies>
111111
</Link>
112-
<PostBuildEvent>
113-
<Command>for /r "$(xrSdkDir)binaries/$(PlatformShortName)" %%f in (*.dll *.pdb) do @xcopy /Q /D "%%f" "$(OutDir)"</Command>
114-
</PostBuildEvent>
115-
<PostBuildEvent>
116-
<Message>Copying the required libraries ...</Message>
117-
</PostBuildEvent>
118112
<PreBuildEvent>
119113
<Command>where /q git
120114
if errorlevel 1 (
121-
echo git is not founded
115+
echo git not found
122116
goto :EOF
123117
)
124-
echo git is founded
118+
echo git found
125119
call .GitInfo.cmd</Command>
126120
</PreBuildEvent>
121+
<CustomBuildStep>
122+
<Command>if not exist "$(OutDir)tbb_debug.dll" copy /y "$(xrSdkDir)binaries\$(PlatformShortName)\tbb_debug.dll" "$(OutDir)tbb_debug.dll"
123+
if not exist "$(OutDir)tbb_preview_debug.dll" copy /y "$(xrSdkDir)binaries\$(PlatformShortName)\tbb_preview_debug.dll" "$(OutDir)tbb_preview_debug.dll"
124+
if not exist "$(OutDir)tbbmalloc_debug.dll" copy /y "$(xrSdkDir)binaries\$(PlatformShortName)\tbbmalloc_debug.dll" "$(OutDir)tbbmalloc_debug.dll"
125+
if not exist "$(OutDir)tbbmalloc_proxy_debug.dll" copy /y "$(xrSdkDir)binaries\$(PlatformShortName)\tbbmalloc_proxy_debug.dll" "$(OutDir)tbbmalloc_proxy_debug.dll"</Command>
126+
<Outputs>$(OutDir)tbb_debug.dll;$(OutDir)tbb_preview_debug.dll;$(OutDir)tbbmalloc_debug.dll;$(OutDir)tbbmalloc_proxy_debug.dll;%(Outputs)</Outputs>
127+
<TreatOutputAsContent>true</TreatOutputAsContent>
128+
<Inputs>$(xrSdkDir)binaries\$(PlatformShortName)\tbb_debug.dll;$(xrSdkDir)binaries\$(PlatformShortName)\tbb_preview_debug.dll;$(xrSdkDir)binaries\$(PlatformShortName)\tbbmalloc_debug.dll;$(xrSdkDir)binaries\$(PlatformShortName)\tbbmalloc_proxy_debug.dll;%(Inputs)</Inputs>
129+
</CustomBuildStep>
127130
</ItemDefinitionGroup>
128131
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
129132
<ClCompile>
@@ -133,19 +136,24 @@ call .GitInfo.cmd</Command>
133136
<Link>
134137
<AdditionalDependencies>PowrProf.lib;DbgHelp.lib;%(AdditionalDependencies)</AdditionalDependencies>
135138
</Link>
136-
<PostBuildEvent>
137-
<Command>for /r "$(xrSdkDir)binaries/$(PlatformShortName)" %%f in (*.dll *.pdb) do @xcopy /Q /D "%%f" "$(OutDir)"</Command>
138-
<Message>Copying the required libraries ...</Message>
139-
</PostBuildEvent>
140139
<PreBuildEvent>
141140
<Command>where /q git
142141
if errorlevel 1 (
143-
echo git is not founded
142+
echo git not found
144143
goto :EOF
145144
)
146-
echo git is founded
145+
echo git found
147146
call .GitInfo.cmd</Command>
148147
</PreBuildEvent>
148+
<CustomBuildStep>
149+
<Command>if not exist "$(OutDir)tbb_debug.dll" copy /y "$(xrSdkDir)binaries\$(PlatformShortName)\tbb_debug.dll" "$(OutDir)tbb_debug.dll"
150+
if not exist "$(OutDir)tbb_preview_debug.dll" copy /y "$(xrSdkDir)binaries\$(PlatformShortName)\tbb_preview_debug.dll" "$(OutDir)tbb_preview_debug.dll"
151+
if not exist "$(OutDir)tbbmalloc_debug.dll" copy /y "$(xrSdkDir)binaries\$(PlatformShortName)\tbbmalloc_debug.dll" "$(OutDir)tbbmalloc_debug.dll"
152+
if not exist "$(OutDir)tbbmalloc_proxy_debug.dll" copy /y "$(xrSdkDir)binaries\$(PlatformShortName)\tbbmalloc_proxy_debug.dll" "$(OutDir)tbbmalloc_proxy_debug.dll"</Command>
153+
<Outputs>$(OutDir)tbb_debug.dll;$(OutDir)tbb_preview_debug.dll;$(OutDir)tbbmalloc_debug.dll;$(OutDir)tbbmalloc_proxy_debug.dll;%(Outputs)</Outputs>
154+
<TreatOutputAsContent>true</TreatOutputAsContent>
155+
<Inputs>$(xrSdkDir)binaries\$(PlatformShortName)\tbb_debug.dll;$(xrSdkDir)binaries\$(PlatformShortName)\tbb_preview_debug.dll;$(xrSdkDir)binaries\$(PlatformShortName)\tbbmalloc_debug.dll;$(xrSdkDir)binaries\$(PlatformShortName)\tbbmalloc_proxy_debug.dll;%(Inputs)</Inputs>
156+
</CustomBuildStep>
149157
</ItemDefinitionGroup>
150158
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
151159
<ClCompile>
@@ -156,21 +164,24 @@ call .GitInfo.cmd</Command>
156164
<Link>
157165
<AdditionalDependencies>PowrProf.lib;DbgHelp.lib;%(AdditionalDependencies)</AdditionalDependencies>
158166
</Link>
159-
<PostBuildEvent>
160-
<Command>for /r "$(xrSdkDir)binaries/$(PlatformShortName)" %%f in (*.dll *.pdb) do @xcopy /Q /D "%%f" "$(OutDir)"</Command>
161-
</PostBuildEvent>
162-
<PostBuildEvent>
163-
<Message>Copying the required libraries ...</Message>
164-
</PostBuildEvent>
165167
<PreBuildEvent>
166168
<Command>where /q git
167169
if errorlevel 1 (
168-
echo git is not founded
170+
echo git not found
169171
goto :EOF
170172
)
171-
echo git is founded
173+
echo git found
172174
call .GitInfo.cmd</Command>
173175
</PreBuildEvent>
176+
<CustomBuildStep>
177+
<Command>if not exist "$(OutDir)tbb.dll" copy /y "$(xrSdkDir)binaries\$(PlatformShortName)\tbb.dll" "$(OutDir)tbb.dll"
178+
if not exist "$(OutDir)tbb_preview.dll" copy /y "$(xrSdkDir)binaries\$(PlatformShortName)\tbb_preview.dll" "$(OutDir)tbb_preview.dll"
179+
if not exist "$(OutDir)tbbmalloc.dll" copy /y "$(xrSdkDir)binaries\$(PlatformShortName)\tbbmalloc.dll" "$(OutDir)tbbmalloc.dll"
180+
if not exist "$(OutDir)tbbmalloc_proxy.dll" copy /y "$(xrSdkDir)binaries\$(PlatformShortName)\tbbmalloc_proxy.dll" "$(OutDir)tbbmalloc_proxy.dll"</Command>
181+
<Outputs>$(OutDir)tbb.dll;$(OutDir)tbb_preview.dll;$(OutDir)tbbmalloc.dll;$(OutDir)tbbmalloc_proxy.dll;%(Outputs)</Outputs>
182+
<TreatOutputAsContent>true</TreatOutputAsContent>
183+
<Inputs>$(xrSdkDir)binaries\$(PlatformShortName)\tbb.dll;$(xrSdkDir)binaries\$(PlatformShortName)\tbb_preview.dll;$(xrSdkDir)binaries\$(PlatformShortName)\tbbmalloc.dll;$(xrSdkDir)binaries\$(PlatformShortName)\tbbmalloc_proxy.dll;%(Inputs)</Inputs>
184+
</CustomBuildStep>
174185
</ItemDefinitionGroup>
175186
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
176187
<ClCompile>
@@ -180,19 +191,24 @@ call .GitInfo.cmd</Command>
180191
<Link>
181192
<AdditionalDependencies>PowrProf.lib;DbgHelp.lib;%(AdditionalDependencies)</AdditionalDependencies>
182193
</Link>
183-
<PostBuildEvent>
184-
<Command>for /r "$(xrSdkDir)binaries/$(PlatformShortName)" %%f in (*.dll *.pdb) do @xcopy /Q /D "%%f" "$(OutDir)"</Command>
185-
<Message>Copying the required libraries ...</Message>
186-
</PostBuildEvent>
187194
<PreBuildEvent>
188195
<Command>where /q git
189196
if errorlevel 1 (
190-
echo git is not founded
197+
echo git not found
191198
goto :EOF
192199
)
193-
echo git is founded
200+
echo git found
194201
call .GitInfo.cmd</Command>
195202
</PreBuildEvent>
203+
<CustomBuildStep>
204+
<Command>if not exist "$(OutDir)tbb.dll" copy /y "$(xrSdkDir)binaries\$(PlatformShortName)\tbb.dll" "$(OutDir)tbb.dll"
205+
if not exist "$(OutDir)tbb_preview.dll" copy /y "$(xrSdkDir)binaries\$(PlatformShortName)\tbb_preview.dll" "$(OutDir)tbb_preview.dll"
206+
if not exist "$(OutDir)tbbmalloc.dll" copy /y "$(xrSdkDir)binaries\$(PlatformShortName)\tbbmalloc.dll" "$(OutDir)tbbmalloc.dll"
207+
if not exist "$(OutDir)tbbmalloc_proxy.dll" copy /y "$(xrSdkDir)binaries\$(PlatformShortName)\tbbmalloc_proxy.dll" "$(OutDir)tbbmalloc_proxy.dll"</Command>
208+
<Outputs>$(OutDir)tbb.dll;$(OutDir)tbb_preview.dll;$(OutDir)tbbmalloc.dll;$(OutDir)tbbmalloc_proxy.dll;%(Outputs)</Outputs>
209+
<TreatOutputAsContent>true</TreatOutputAsContent>
210+
<Inputs>$(xrSdkDir)binaries\$(PlatformShortName)\tbb.dll;$(xrSdkDir)binaries\$(PlatformShortName)\tbb_preview.dll;$(xrSdkDir)binaries\$(PlatformShortName)\tbbmalloc.dll;$(xrSdkDir)binaries\$(PlatformShortName)\tbbmalloc_proxy.dll;%(Inputs)</Inputs>
211+
</CustomBuildStep>
196212
</ItemDefinitionGroup>
197213
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Mixed|Win32'">
198214
<ClCompile>
@@ -202,21 +218,24 @@ call .GitInfo.cmd</Command>
202218
<Link>
203219
<AdditionalDependencies>PowrProf.lib;DbgHelp.lib;%(AdditionalDependencies)</AdditionalDependencies>
204220
</Link>
205-
<PostBuildEvent>
206-
<Command>for /r "$(xrSdkDir)binaries/$(PlatformShortName)" %%f in (*.dll *.pdb) do @xcopy /Q /D "%%f" "$(OutDir)"</Command>
207-
</PostBuildEvent>
208-
<PostBuildEvent>
209-
<Message>Copying the required libraries ...</Message>
210-
</PostBuildEvent>
211221
<PreBuildEvent>
212222
<Command>where /q git
213223
if errorlevel 1 (
214-
echo git is not founded
224+
echo git not found
215225
goto :EOF
216226
)
217-
echo git is founded
227+
echo git found
218228
call .GitInfo.cmd</Command>
219229
</PreBuildEvent>
230+
<CustomBuildStep>
231+
<Command>if not exist "$(OutDir)tbb.dll" copy /y "$(xrSdkDir)binaries\$(PlatformShortName)\tbb.dll" "$(OutDir)tbb.dll"
232+
if not exist "$(OutDir)tbb_preview.dll" copy /y "$(xrSdkDir)binaries\$(PlatformShortName)\tbb_preview.dll" "$(OutDir)tbb_preview.dll"
233+
if not exist "$(OutDir)tbbmalloc.dll" copy /y "$(xrSdkDir)binaries\$(PlatformShortName)\tbbmalloc.dll" "$(OutDir)tbbmalloc.dll"
234+
if not exist "$(OutDir)tbbmalloc_proxy.dll" copy /y "$(xrSdkDir)binaries\$(PlatformShortName)\tbbmalloc_proxy.dll" "$(OutDir)tbbmalloc_proxy.dll"</Command>
235+
<Outputs>$(OutDir)tbb.dll;$(OutDir)tbb_preview.dll;$(OutDir)tbbmalloc.dll;$(OutDir)tbbmalloc_proxy.dll;%(Outputs)</Outputs>
236+
<TreatOutputAsContent>true</TreatOutputAsContent>
237+
<Inputs>$(xrSdkDir)binaries\$(PlatformShortName)\tbb.dll;$(xrSdkDir)binaries\$(PlatformShortName)\tbb_preview.dll;$(xrSdkDir)binaries\$(PlatformShortName)\tbbmalloc.dll;$(xrSdkDir)binaries\$(PlatformShortName)\tbbmalloc_proxy.dll;%(Inputs)</Inputs>
238+
</CustomBuildStep>
220239
</ItemDefinitionGroup>
221240
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Mixed|x64'">
222241
<ClCompile>
@@ -226,19 +245,24 @@ call .GitInfo.cmd</Command>
226245
<Link>
227246
<AdditionalDependencies>PowrProf.lib;DbgHelp.lib;%(AdditionalDependencies)</AdditionalDependencies>
228247
</Link>
229-
<PostBuildEvent>
230-
<Command>for /r "$(xrSdkDir)binaries/$(PlatformShortName)" %%f in (*.dll *.pdb) do @xcopy /Q /D "%%f" "$(OutDir)"</Command>
231-
<Message>Copying the required libraries ...</Message>
232-
</PostBuildEvent>
233248
<PreBuildEvent>
234249
<Command>where /q git
235250
if errorlevel 1 (
236-
echo git is not founded
251+
echo git not found
237252
goto :EOF
238253
)
239-
echo git is founded
254+
echo git found
240255
call .GitInfo.cmd</Command>
241256
</PreBuildEvent>
257+
<CustomBuildStep>
258+
<Command>if not exist "$(OutDir)tbb.dll" copy /y "$(xrSdkDir)binaries\$(PlatformShortName)\tbb.dll" "$(OutDir)tbb.dll"
259+
if not exist "$(OutDir)tbb_preview.dll" copy /y "$(xrSdkDir)binaries\$(PlatformShortName)\tbb_preview.dll" "$(OutDir)tbb_preview.dll"
260+
if not exist "$(OutDir)tbbmalloc.dll" copy /y "$(xrSdkDir)binaries\$(PlatformShortName)\tbbmalloc.dll" "$(OutDir)tbbmalloc.dll"
261+
if not exist "$(OutDir)tbbmalloc_proxy.dll" copy /y "$(xrSdkDir)binaries\$(PlatformShortName)\tbbmalloc_proxy.dll" "$(OutDir)tbbmalloc_proxy.dll"</Command>
262+
<Outputs>$(OutDir)tbb.dll;$(OutDir)tbb_preview.dll;$(OutDir)tbbmalloc.dll;$(OutDir)tbbmalloc_proxy.dll;%(Outputs)</Outputs>
263+
<TreatOutputAsContent>true</TreatOutputAsContent>
264+
<Inputs>$(xrSdkDir)binaries\$(PlatformShortName)\tbb.dll;$(xrSdkDir)binaries\$(PlatformShortName)\tbb_preview.dll;$(xrSdkDir)binaries\$(PlatformShortName)\tbbmalloc.dll;$(xrSdkDir)binaries\$(PlatformShortName)\tbbmalloc_proxy.dll;%(Inputs)</Inputs>
265+
</CustomBuildStep>
242266
</ItemDefinitionGroup>
243267
<ItemGroup>
244268
<ClCompile Include="Animation\Bone.cpp" />

0 commit comments

Comments
 (0)