Apply libxml2 static workaround when building with Hunter

feature/quick-start-py
kaetemi 3 years ago
parent 1247e69e7b
commit 4254f5a01b
No known key found for this signature in database
GPG Key ID: 9873C4D40BB479BC

@ -34,7 +34,7 @@ for ts in SortedToolsets:
toolchain["Toolset"] = ts toolchain["Toolset"] = ts
toolchain["Prefix"] = FindVSPrefixPaths(ts, platform) toolchain["Prefix"] = FindVSPrefixPaths(ts, platform)
if not len(toolchain["Prefix"]) and vs["Version"] >= 14: if not len(toolchain["Prefix"]) and vs["Version"] >= 14:
toolchain["Hunter"] = vs["Version"] >= 14 toolchain["Hunter"] = True
toolchain["CMake"] = [] toolchain["CMake"] = []
if vs["Version"] < 14: if vs["Version"] < 14:
toolchain["CMake"] += [ "-DWINSDK_VERSION=6.0A" ] toolchain["CMake"] += [ "-DWINSDK_VERSION=6.0A" ]
@ -57,6 +57,9 @@ for ts in SortedToolsets:
toolchain["EnvSet"] += [ "VS160COMNTOOLS=" + os.path.normpath(os.path.join(vs["Path"], "Common7/Tools")) ] toolchain["EnvSet"] += [ "VS160COMNTOOLS=" + os.path.normpath(os.path.join(vs["Path"], "Common7/Tools")) ]
elif vs["Toolset"] == "v143" and vs["Version"] > 17: elif vs["Toolset"] == "v143" and vs["Version"] > 17:
toolchain["EnvSet"] += [ "VS170COMNTOOLS=" + os.path.normpath(os.path.join(vs["Path"], "Common7/Tools")) ] toolchain["EnvSet"] += [ "VS170COMNTOOLS=" + os.path.normpath(os.path.join(vs["Path"], "Common7/Tools")) ]
# Hunter doesn't build the libxml2 dependency correctly in static build mode
if "Hunter" in toolchain:
toolchain["EnvSet"] += [ "CL=/DLIBXML_STATIC;%CL%" ]
toolchain["Version"] = vs["Version"] toolchain["Version"] = vs["Version"]
directXSdk = FindDirectXSDK(vs["Version"]) directXSdk = FindDirectXSDK(vs["Version"])
if directXSdk: if directXSdk:
@ -95,6 +98,7 @@ for ts in SortedToolsets:
copyToolchain["Hunter"] = True copyToolchain["Hunter"] = True
copyToolchain["Prefix"] = [] copyToolchain["Prefix"] = []
copyToolchain["EnvPath"] = [] copyToolchain["EnvPath"] = []
copyToolchain["EnvSet"] += [ "CL=/DLIBXML_STATIC;%CL%" ]
Toolchains[toolchain["OS"] + "/VS/" + ts + "/" + platform + "/H"] = copyToolchain Toolchains[toolchain["OS"] + "/VS/" + ts + "/" + platform + "/H"] = copyToolchain
with open(os.path.join(NeLConfigDir, "toolchains_" + socket.gethostname().lower() + "_default.json"), 'w') as fo: with open(os.path.join(NeLConfigDir, "toolchains_" + socket.gethostname().lower() + "_default.json"), 'w') as fo:

Loading…
Cancel
Save