Skip to content

Commit a8aecf6

Browse files
sunyabpixar-oss
authored andcommitted
build_usd.py: Fix macOS build issues from bump to libpng v1.6.47
- Removed unnecessary patch for universal binary builds. This change was applied upstream in v1.6.40 in pnggroup/libpng@cd0ea2a. - Explicitly disable framework builds to avoid issues with OpenImageIO. This was enabled in v1.6.41 in pnggroup/libpng@8fc13a8. - Updated URL to point to pnggroup/libpng repository instead of depending on redirect. For reference, build_usd.py was updated from v1.6.38 to v1.6.47 in change 2359710. (Internal change: 2362090)
1 parent 85b6404 commit a8aecf6

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

build_scripts/build_usd.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1216,20 +1216,20 @@ def InstallTIFF(context, force, buildArgs):
12161216
############################################################
12171217
# PNG
12181218

1219-
PNG_URL = "https://github.com/glennrp/libpng/archive/refs/tags/v1.6.47.zip"
1219+
PNG_URL = "https://github.com/pnggroup/libpng/archive/refs/tags/v1.6.47.zip"
12201220

12211221
def InstallPNG(context, force, buildArgs):
12221222
with CurrentWorkingDirectory(DownloadURL(PNG_URL, context, force)):
1223-
macArgs = []
1223+
# Framework builds were enabled by default in v1.6.41 in commit
1224+
# 8fc13a8. We explicitly disable this to maintain legacy behavior
1225+
# from v1.6.38, which is what this script used previously.
1226+
# OpenImageIO v2.5.16.0 runs into linker issues otherwise.
1227+
macArgs = ["-DPNG_FRAMEWORK=OFF"]]
1228+
12241229
if MacOS() and apple_utils.IsTargetArm(context):
12251230
# Ensure libpng's build doesn't erroneously activate inappropriate
12261231
# Neon extensions
1227-
macArgs = ["-DCMAKE_C_FLAGS=\"-DPNG_ARM_NEON_OPT=0\""]
1228-
1229-
if context.targetUniversal:
1230-
PatchFile("scripts/genout.cmake.in",
1231-
[("CMAKE_OSX_ARCHITECTURES",
1232-
"CMAKE_OSX_INTERNAL_ARCHITECTURES")])
1232+
macArgs += ["-DCMAKE_C_FLAGS=\"-DPNG_ARM_NEON_OPT=0\""]
12331233

12341234
RunCMake(context, force, buildArgs + macArgs)
12351235

0 commit comments

Comments
 (0)