Commit c88939a1 authored by Gilles Caulier's avatar Gilles Caulier 🗼
Browse files

ajust patch to compile libjxl under macports

CCBUGS: 436533
parent feef9f4e
......@@ -48,7 +48,7 @@ elseif(APPLE)
GIT_REPOSITORY https://github.com/libjxl/libjxl.git
GIT_TAG v0.6.1
PATCH_COMMAND ${PATCH_COMMAND} -p1 -i ${CMAKE_CURRENT_SOURCE_DIR}/jxl-lib-only.patch
PATCH_COMMAND ${PATCH_COMMAND} -p1 -i ${CMAKE_CURRENT_SOURCE_DIR}/jxl-lib-macports.patch
CONFIGURE_COMMAND git submodule update --init --recursive --depth 1 --recommend-shallow &&
cp -f ${CMAKE_CURRENT_SOURCE_DIR}/../../../../bootstrap.macports <SOURCE_DIR>/. &&
......@@ -72,7 +72,7 @@ else() # Linux
GIT_REPOSITORY https://github.com/libjxl/libjxl.git
GIT_TAG v0.6.1
PATCH_COMMAND ${PATCH_COMMAND} -p1 -i ${CMAKE_CURRENT_SOURCE_DIR}/jxl-lib-only.patch
PATCH_COMMAND ${PATCH_COMMAND} -p1 -i ${CMAKE_CURRENT_SOURCE_DIR}/jxl-lib-linux.patch
CONFIGURE_COMMAND git submodule update --init --recursive --depth 1 --recommend-shallow &&
$(CMAKE_COMMAND) . -DCMAKE_INSTALL_PREFIX=${PREFIX_ext_libjxl}
......
diff --git a/CMakeLists.txt b/CMakeLists.txt
index c2790ab..003dee8 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -71,23 +71,23 @@ endif()
set(WARNINGS_AS_ERRORS_DEFAULT false)
-set(JPEGXL_ENABLE_FUZZERS ${ENABLE_FUZZERS_DEFAULT} CACHE BOOL
+set(JPEGXL_ENABLE_FUZZERS false CACHE BOOL
"Build JPEGXL fuzzer targets.")
set(JPEGXL_ENABLE_DEVTOOLS false CACHE BOOL
"Build JPEGXL developer tools.")
-set(JPEGXL_ENABLE_TOOLS true CACHE BOOL
+set(JPEGXL_ENABLE_TOOLS false CACHE BOOL
"Build JPEGXL user tools: cjxl and djxl.")
-set(JPEGXL_ENABLE_MANPAGES true CACHE BOOL
+set(JPEGXL_ENABLE_MANPAGES false CACHE BOOL
"Build and install man pages for the command-line tools.")
-set(JPEGXL_ENABLE_BENCHMARK true CACHE BOOL
+set(JPEGXL_ENABLE_BENCHMARK false CACHE BOOL
"Build JPEGXL benchmark tools.")
-set(JPEGXL_ENABLE_EXAMPLES true CACHE BOOL
+set(JPEGXL_ENABLE_EXAMPLES false CACHE BOOL
"Build JPEGXL library usage examples.")
-set(JPEGXL_ENABLE_JNI true CACHE BOOL
+set(JPEGXL_ENABLE_JNI false CACHE BOOL
"Build JPEGXL JNI Java wrapper, if Java dependencies are installed.")
-set(JPEGXL_ENABLE_SJPEG true CACHE BOOL
+set(JPEGXL_ENABLE_SJPEG false CACHE BOOL
"Build JPEGXL with support for encoding with sjpeg.")
-set(JPEGXL_ENABLE_OPENEXR true CACHE BOOL
+set(JPEGXL_ENABLE_OPENEXR false CACHE BOOL
"Build JPEGXL with support for OpenEXR if available.")
set(JPEGXL_ENABLE_SKCMS true CACHE BOOL
"Build with skcms instead of lcms2.")
@@ -95,7 +95,7 @@ set(JPEGXL_BUNDLE_SKCMS true CACHE BOOL
"When building with skcms, bundle it into libjxl.a.")
set(JPEGXL_ENABLE_VIEWERS false CACHE BOOL
"Build JPEGXL viewer tools for evaluation.")
-set(JPEGXL_ENABLE_TCMALLOC ${ENABLE_TCMALLOC_DEFAULT} CACHE BOOL
+set(JPEGXL_ENABLE_TCMALLOC false CACHE BOOL
"Build JPEGXL using gperftools (tcmalloc) allocator.")
set(JPEGXL_ENABLE_PLUGINS false CACHE BOOL
"Build third-party plugings to support JPEG XL in other applications.")
@@ -109,7 +109,7 @@ set(JPEGXL_ENABLE_TRANSCODE_JPEG true CACHE BOOL
(default enabled)")
set(JPEGXL_STATIC false CACHE BOOL
"Build tools as static binaries.")
-set(JPEGXL_WARNINGS_AS_ERRORS ${WARNINGS_AS_ERRORS_DEFAULT} CACHE BOOL
+set(JPEGXL_WARNINGS_AS_ERRORS false CACHE BOOL
"Treat warnings as errors during compilation.")
set(JPEGXL_DEP_LICENSE_DIR "" CACHE STRING
"Directory where to search for system dependencies \"copyright\" files.")
@@ -382,4 +382,4 @@ add_subdirectory(plugins)
endif ()
# Binary tools
-add_subdirectory(tools)
+#add_subdirectory(tools)
diff --git a/lib/jxl.cmake b/lib/jxl.cmake
index c0290ab..239cc9f 100644
--- a/lib/jxl.cmake
+++ b/lib/jxl.cmake
@@ -541,8 +541,10 @@ foreach(target IN ITEMS jxl jxl_dec)
# This hides the default visibility symbols from static libraries bundled into
# the shared library. In particular this prevents exposing symbols from hwy
# and skcms in the shared library.
+ if(NOT APPLE)
set_property(TARGET ${target} APPEND_STRING PROPERTY
LINK_FLAGS " -Wl,--exclude-libs=ALL")
+ endif()
endforeach()
# Only install libjxl shared library. The libjxl_dec is not installed since it
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment