Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set JPEGXL_BUNDLE_LIBPNG to OFF #71

Closed
wants to merge 1 commit into from

Conversation

meowtec
Copy link
Contributor

@meowtec meowtec commented Aug 14, 2024

JPEGXL_BUNDLE_LIBPNG defaults to be true if the target is emscripten, then cmake will throw an error because libjxl/third_party/libpng is excluded.

libjxl/CMakeLists.txt:

if((SANITIZER STREQUAL "msan") OR EMSCRIPTEN)
  set(BUNDLE_LIBPNG_DEFAULT YES)

set(JPEGXL_BUNDLE_LIBPNG ${BUNDLE_LIBPNG_DEFAULT} CACHE BOOL

libjxl/third_party/CMakeLists.txt:

if (JPEGXL_BUNDLE_LIBPNG AND EMSCRIPTEN)
  if (NOT EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/libpng/CMakeLists.txt")
  message(FATAL_ERROR "Please run ${PROJECT_SOURCE_DIR}/deps.sh to fetch the "
          "build dependencies.")

@inflation
Copy link
Owner

Merged by hand in 52cc720.

AFAIK the core library shouldn't link to libpng. So this could be reported to upstream as well.

@inflation inflation closed this Aug 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants