Cleaned up the ArtifactsDir fix and added comments for context.

This commit is contained in:
Michael Yanni 2024-02-08 13:38:23 -08:00
parent dfcb8918d4
commit d29a512cc6
2 changed files with 5 additions and 13 deletions

View file

@ -12,6 +12,7 @@ set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /SUBSYSTEM:WINDOWS /ENTRY:
# The WiX SDK is extracted from a NuGet package using an SDK .csproj (finalizer-build) that copies the "lib" and "inc" folders to a stable location.
# The defines below (values in ${}) are set in the finalizer.nativeproj.
# See: https://github.com/dotnet/arcade/tree/main/src/Microsoft.DotNet.CMake.Sdk#common-items
# Note: The directory paths use forward slashes because backslashes are escape characters.
include_directories(${ArtifactsDir}WixSdk/inc)
include_directories(${ArtifactsDir}obj)
link_directories(${ArtifactsDir}WixSdk/lib/${Platform})

View file

@ -3,26 +3,17 @@
<PropertyGroup>
<Platform Condition="'$(Platform)' == '' Or $(Platform) == 'AnyCPU'">$(Architecture)</Platform>
<!-- We use forward slashes in the ArtifactsDir path because backslashes in the CMakeLists.txt are escape characters. -->
<ArtifactsDirForCMake>$([System.String]::Copy($(ArtifactsDir)).Replace('\','/'))</ArtifactsDirForCMake>
<CMakeLists>CMakeLists.txt</CMakeLists>
</PropertyGroup>
<!-- This will be passed through -D and referenced by the CMakeLists.txt to correctly resolve the platform specific libs. -->
<ItemGroup>
<CMakeDefines Include="Platform" Value="$(Platform)" />
<CMakeDefines Include="ArtifactsDir" Value="$([System.String]::Copy($(ArtifactsDir)).Replace('\','/'))" />
<CMakeDefines Include="ArtifactsDir" Value="$(ArtifactsDirForCMake)" />
<!-- Include this item below to create a binlog for the native build. -->
<!-- <CMakeNativeToolArguments Include="/bl:$(ArtifactsDir)native.binlog" /> -->
<!-- <CMakeNativeToolArguments Include="/bl:$(ArtifactsDirForCMake)native.binlog" /> -->
</ItemGroup>
<Target Name="FinalizerPropertyCheck" AfterTargets="Restore" BeforeTargets="Build">
<Message Text="Platform: $(Platform)" Importance="high"/>
<Message Text="ArtifactsDir: $(ArtifactsDir)" Importance="high"/>
<PropertyGroup>
<ArtDirFixed>$([System.String]::Copy($(ArtifactsDir)).Replace('\','/'))</ArtDirFixed>
</PropertyGroup>
<Message Text="ArtDirFixed: $(ArtDirFixed)" Importance="high"/>
</Target>
</Project>