Browse Source

SDL Don't specify platform toolset, get version

This may break v142 builds, I haven't tested that.
master
Macoy Madson 8 months ago
parent
commit
7f459eb251
  1. 17
      src/SDL.cake

17
src/SDL.cake

@ -260,20 +260,17 @@ Note that you can also build SDL manually. This can be useful if you are porting
(fileExists "Dependencies/SDL/VisualC/x64/Debug/SDL2.dll"))
(return true))
(var process-path (* (const char)) "MSBuild.exe")
;; TODO: This shouldn't need a full path
(cond
((fileExists "C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/MSBuild/15.0/Bin/amd64/MSBuild.exe")
(set process-path "C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/MSBuild/15.0/Bin/amd64/MSBuild.exe"))
((fileExists "C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/MSBuild/Current/Bin/amd64/MSBuild.exe")
(set process-path "C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/MSBuild/Current/Bin/amd64/MSBuild.exe")))
;; Cakelisp's resolveExecutablePath() will find MSBuild for us
(var msbuild-path (* (const char)) "MSBuild.exe")
(var target-platform-version ([] 256 char) (array 0))
(makeTargetPlatformVersionArgument target-platform-version (sizeof target-platform-version))
(run-process-sequential-or
(process-path
(msbuild-path
"Dependencies/SDL/VisualC/SDL.sln"
;; TODO: Debug vs release
;; TODO: Auto detect? Environment variables: WindowsSDKVersion
"/p:PlatformToolset=v142"
"/p:WindowsTargetPlatformVersion=10.0.19041.0")
;;"/p:PlatformToolset=v142"
target-platform-version)
(build-sdl-on-failure
"failed at SDL build step. This requires Microsoft Visual Studio to execute.\nYou may also
need to edit SDL.cake and update the PlatformToolset and SDK versions for your environment.")

Loading…
Cancel
Save