I don't know what I'm doing, so I'm using -G Xcode simply because that's what's in the ios-cmake toolchain example. I took your advice and looked for flags to set, and this is my new cmake invocation (tl;dr everything off except static flag, which invokes -DBUILD_SHARED_LIBS=OFF and required files):
cmake -B build \
-DJPEGXL_ENABLE_FUZZERS=OFF \
-DJPEGXL_ENABLE_DEVTOOLS=OFF \
-DJPEGXL_ENABLE_TOOLS=OFF \
-DJPEGXL_ENABLE_JPEGLI=OFF \
-DJPEGXL_INSTALL_JPEGLI_LIBJPEG=OFF \
-DJPEGXL_ENABLE_DOXYGEN=OFF \
-DJPEGXL_ENABLE_BENCHMARK=OFF \
-DJPEGXL_ENABLE_EXAMPLES=OFF \
-DJPEGXL_BUNDLE_LIBPNG=OFF \
-DJPEGXL_ENABLE_JNI=OFF \
-DJPEGXL_ENABLE_SJPEG=OFF \
-DJPEGXL_ENABLE_OPENEXR=OFF \
-DJPEGXL_ENABLE_SKCMS=ON \
-DJPEGXL_ENABLE_VIEWERS=OFF \
-DJPEGXL_ENABLE_PLUGINS=OFF \
-DJPEGXL_ENABLE_COVERAGE=OFF \
-DJPEGXL_ENABLE_TRANSCODE_JPEG=OFF \
-DJPEGXL_STATIC=ON \
-DJPEGXL_TEST_TOOLS=OFF \
-DJPEGXL_ENABLE_AVX512=OFF \
-DJPEGXL_ENABLE_AVX512_SPR=OFF \
-DJPEGXL_ENABLE_AVX512_ZEN4=OFF \
-DJPEGXL_FORCE_SYSTEM_BROTLI=OFF \
-DJPEGXL_FORCE_SYSTEM_GTEST=ON \
-DJPEGXL_FORCE_SYSTEM_LCMS2=ON \
-DJPEGXL_FORCE_SYSTEM_HWY=OFF \
-DBUILD_SHARED_LIBS=OFF \
-DCMAKE_TOOLCHAIN_FILE=../../ios.toolchain.cmake \
-DPLATFORM=OS64 \
-DCMAKE_BUILD_TYPE=Release \
-DBUILD_TESTING=OFF ..
With -G Xcode I'm back to the same errors as above with highway and brotli, which means this is a dependency issue even with flags set.
Without it, I get the following error:
[ 6%] Linking CXX executable hwy_list_targets.app/hwy_list_targets
ld: library not found for -lcrt0.o
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [third_party/highway/hwy_list_targets.app/hwy_list_targets] Error 1
make[1]: *** [third_party/highway/CMakeFiles/hwy_list_targets.dir/all] Error 2
make: *** [all] Error 2
At this point, I have to say that this has been a learning experience but this is too much to just evaluate whether JXL fits my needs. I need to get back to productive work.
Can I make you an offer? If you compiled JXL yourself so it works on your iOS runtime, with encode/decode and animation functions intact and performant, I will gladly pay you for detailed instructions on how to replicate your success, and also a bit more to thank you for your help here and elsewhere. We can discuss the details elsewhere.
Note that I'm not asking for a compiled product (security issues), but for the instructions on how to get from the reference repository to iOS runtime with the requested functions.
Topic:
Media Technologies
SubTopic:
Video
Tags: