Skip to content

Commit

Permalink
lcms2: Update to VS2019
Browse files Browse the repository at this point in the history
In order to enable win-arm64, VS2019 should be used, while other
platforms should work with newer version as well.
Tested on x64-win10.
  • Loading branch information
gaborkertesz committed Oct 29, 2021
1 parent caa0deb commit 0af6042
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions winbuild/build_prepare.py
Original file line number Diff line number Diff line change
Expand Up @@ -223,21 +223,21 @@ def cmd_msbuild(
"filename": "lcms2-2.12.tar.gz",
"dir": "lcms2-2.12",
"patch": {
r"Projects\VC2017\lcms2_static\lcms2_static.vcxproj": {
r"Projects\VC2019\lcms2_static\lcms2_static.vcxproj": {
# default is /MD for x86 and /MT for x64, we need /MD always
"<RuntimeLibrary>MultiThreaded</RuntimeLibrary>": "<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>", # noqa: E501
# retarget to default toolset (selected by vcvarsall.bat)
"<PlatformToolset>v141</PlatformToolset>": "<PlatformToolset>$(DefaultPlatformToolset)</PlatformToolset>", # noqa: E501
"<PlatformToolset>v142</PlatformToolset>": "<PlatformToolset>$(DefaultPlatformToolset)</PlatformToolset>", # noqa: E501
# retarget to latest (selected by vcvarsall.bat)
"<WindowsTargetPlatformVersion>10.0.17134.0</WindowsTargetPlatformVersion>": "<WindowsTargetPlatformVersion>$(WindowsSDKVersion)</WindowsTargetPlatformVersion>", # noqa: E501
"<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>": "<WindowsTargetPlatformVersion>$(WindowsSDKVersion)</WindowsTargetPlatformVersion>", # noqa: E501
}
},
"build": [
cmd_rmdir("Lib"),
cmd_rmdir(r"Projects\VC2017\Release"),
cmd_msbuild(r"Projects\VC2017\lcms2.sln", "Release", "Clean"),
cmd_rmdir(r"Projects\VC2019\Release"),
cmd_msbuild(r"Projects\VC2019\lcms2.sln", "Release", "Clean"),
cmd_msbuild(
r"Projects\VC2017\lcms2.sln", "Release", "lcms2_static:Rebuild"
r"Projects\VC2019\lcms2.sln", "Release", "lcms2_static:Rebuild"
),
cmd_xcopy("include", "{inc_dir}"),
],
Expand Down

3 comments on commit 0af6042

@nulano
Copy link

@nulano nulano commented on 0af6042 Nov 2, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The only difference between the VC2017 and VC2019 project files is the default value for PlatformToolset and WindowsTargetPlatformVersion, both of which are removed by the patch block, so the only effective change this makes is where the temporary object files are stored.

@gaborkertesz-linaro
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The only difference between the VC2017 and VC2019 project files is the default value for PlatformToolset and WindowsTargetPlatformVersion, both of which are removed by the patch block, so the only effective change this makes is where the temporary object files are stored.

Thanks, I wasn't really aware of that, but the main point of this change is that as VS2019 is the latest (and I can't test with 2017), the new win-arm64 platform was added to 2019 only:
mm2/Little-CMS#288

@nulano
Copy link

@nulano nulano commented on 0af6042 Jan 3, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I mean that the files are identical except for the two patches above, at least in the 2.12 release. I see now there is a change in VS2019 in master, but it hasn't been released yet.

Please sign in to comment.