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

add patch to only build libjxl core

parent d17bae84
......@@ -6,22 +6,26 @@
# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
#
set(PREFIX_ext_jpegxl "${EXTPREFIX}")
set(PREFIX_ext_libjxl "${EXTPREFIX}")
set(JpegXL_Conf -DBUILD_SHARED_LIBS=ON
-DBUILD_TESTING=OFF
)
JoinListAsString("${JpegXL_Conf}" " " BASH_OPTIONS)
if(MINGW)
ExternalProject_Add(ext_jpegxl
ExternalProject_Add(ext_libjxl
DOWNLOAD_DIR ${EXTERNALS_DOWNLOAD_DIR}
GIT_REPOSITORY https://github.com/libjxl/libjxl.git
GIT_TAG v0.6.1
CONFIGURE_COMMAND cp -f ${CMAKE_CURRENT_SOURCE_DIR}/../../../../bootstrap.mxe <SOURCE_DIR>/. &&
PATCH_COMMAND ${PATCH_COMMAND} -p1 -i ${CMAKE_CURRENT_SOURCE_DIR}/jxl-lib-alone.patch
CONFIGURE_COMMAND git submodule update --init --recursive --depth 1 --recommend-shallow &&
cp -f ${CMAKE_CURRENT_SOURCE_DIR}/../../../../bootstrap.mxe <SOURCE_DIR>/. &&
<SOURCE_DIR>/bootstrap.mxe ${MXE_BUILDROOT} RelWithDebInfo ${BASH_OPTIONS}
BUILD_COMMAND cd <SOURCE_DIR>/build.mxe && $(MAKE) -j
......@@ -36,7 +40,7 @@ if(MINGW)
elseif(APPLE)
ExternalProject_Add(ext_jpegxl
ExternalProject_Add(ext_libjxl
DOWNLOAD_DIR ${EXTERNALS_DOWNLOAD_DIR}
# To use official release tarball
......@@ -44,8 +48,11 @@ elseif(APPLE)
GIT_REPOSITORY https://github.com/libjxl/libjxl.git
GIT_TAG v0.6.1
CONFIGURE_COMMAND cp -f ${CMAKE_CURRENT_SOURCE_DIR}/../../../../bootstrap.macports <SOURCE_DIR>/. &&
<SOURCE_DIR>/bootstrap.macports ${PREFIX_ext_jpegxl} RelWithDebInfo x86_64 ${BASH_OPTIONS}
PATCH_COMMAND ${PATCH_COMMAND} -p1 -i ${CMAKE_CURRENT_SOURCE_DIR}/jxl-lib-alone.patch
CONFIGURE_COMMAND git submodule update --init --recursive --depth 1 --recommend-shallow &&
cp -f ${CMAKE_CURRENT_SOURCE_DIR}/../../../../bootstrap.macports <SOURCE_DIR>/. &&
<SOURCE_DIR>/bootstrap.macports ${PREFIX_ext_libjxl} RelWithDebInfo x86_64 ${BASH_OPTIONS}
BUILD_COMMAND cd <SOURCE_DIR>/build && $(MAKE)
......@@ -59,15 +66,18 @@ elseif(APPLE)
else() # Linux
ExternalProject_Add(ext_jpegxl
ExternalProject_Add(ext_libjxl
DOWNLOAD_DIR ${EXTERNALS_DOWNLOAD_DIR}
GIT_REPOSITORY https://github.com/libjxl/libjxl.git
GIT_TAG v0.6.1
CONFIGURE_COMMAND $(CMAKE_COMMAND) . -DCMAKE_INSTALL_PREFIX=${PREFIX_ext_jpegxl}
PATCH_COMMAND ${PATCH_COMMAND} -p1 -i ${CMAKE_CURRENT_SOURCE_DIR}/jxl-lib-alone.patch
CONFIGURE_COMMAND git submodule update --init --recursive --depth 1 --recommend-shallow &&
$(CMAKE_COMMAND) . -DCMAKE_INSTALL_PREFIX=${PREFIX_ext_libjxl}
-DCMAKE_BUILD_TYPE=${GLOBAL_BUILD_TYPE}
-DICONV_INCLUDE_DIR=${PREFIX_ext_jpegxl}/include
-DICONV_INCLUDE_DIR=${PREFIX_ext_libjxl}/include
${JpegXL_Conf}
${GLOBAL_PROFILE}
......
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/third_party/brotli b/third_party/brotli
--- a/third_party/brotli
+++ b/third_party/brotli
@@ -1 +1 @@
-Subproject commit 35ef5c554d888bef217d449346067de05e269b30
+Subproject commit 35ef5c554d888bef217d449346067de05e269b30-dirty
diff --git a/third_party/highway b/third_party/highway
--- a/third_party/highway
+++ b/third_party/highway
@@ -1 +1 @@
-Subproject commit e2397743fe092df68b760d358253773699a16c93
+Subproject commit e2397743fe092df68b760d358253773699a16c93-dirty
diff --git a/third_party/sjpeg b/third_party/sjpeg
--- a/third_party/sjpeg
+++ b/third_party/sjpeg
@@ -1 +1 @@
-Subproject commit 868ab558fad70fcbe8863ba4e85179eeb81cc840
+Subproject commit 868ab558fad70fcbe8863ba4e85179eeb81cc840-dirty
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