Warning, /graphics/digikam/project/bundles/3rdparty/ext_libjxl/CMakeLists.txt is written in an unsupported language. File is not indexed.
0001 # Script to build jpegXL library for digiKam bundle. 0002 # 0003 # Copyright (c) 2015-2024 by Gilles Caulier <caulier dot gilles at gmail dot com> 0004 # 0005 # Redistribution and use is allowed according to the terms of the BSD license. 0006 # For details see the accompanying COPYING-CMAKE-SCRIPTS file. 0007 # 0008 0009 set(PREFIX_ext_libjxl "${EXTPREFIX}") 0010 0011 set(JpegXL_Conf -DBUILD_SHARED_LIBS=ON 0012 -DBUILD_TESTING=OFF 0013 -DJPEGXL_ENABLE_EXAMPLES=OFF 0014 -DJPEGXL_ENABLE_PLUGINS=OFF 0015 -DJPEGXL_ENABLE_TOOLS=OFF 0016 -DJPEGXL_ENABLE_FUZZERS=OFF 0017 -DJPEGXL_ENABLE_DEVTOOLS=OFF 0018 -DJPEGXL_ENABLE_JPEGLI=OFF 0019 -DJPEGXL_ENABLE_JPEGLI_LIBJPEG=ON 0020 -DJPEGXL_ENABLE_DOXYGEN=OFF 0021 -DJPEGXL_ENABLE_MANPAGES=OFF 0022 -DJPEGXL_ENABLE_BENCHMARK=OFF 0023 -DJPEGXL_BUNDLE_LIBPNG=OFF 0024 -DJPEGXL_ENABLE_JNI=OFF 0025 -DJPEGXL_ENABLE_SJPEG=OFF 0026 -DJPEGXL_ENABLE_OPENEXR=OFF 0027 -DJPEGXL_ENABLE_SKCMS=OFF 0028 -DJPEGXL_BUNDLE_SKCMS=OFF 0029 -DJPEGXL_ENABLE_VIEWERS=OFF 0030 -DJPEGXL_ENABLE_TCMALLOC=OFF 0031 -DJPEGXL_ENABLE_COVERAGE=OFF 0032 -DJPEGXL_ENABLE_PROFILER=OFF 0033 -DJPEGXL_ENABLE_SIZELESS_VECTORS=OFF 0034 -DJPEGXL_ENABLE_TRANSCODE_JPEG=ON 0035 -DJPEGXL_ENABLE_BOXES=ON 0036 -DJPEGXL_STATIC=OFF 0037 -DJPEGXL_WARNINGS_AS_ERRORS=OFF 0038 -DJPEGXL_FORCE_NEON=OFF 0039 -DJPEGXL_FORCE_SYSTEM_BROTLI=OFF 0040 -DJPEGXL_FORCE_SYSTEM_GTEST=OFF 0041 -DJPEGXL_FORCE_SYSTEM_LCMS2=OFF 0042 -DJPEGXL_FORCE_SYSTEM_HWY=OFF 0043 ) 0044 0045 if(MINGW) 0046 0047 # See bug comment https://bugs.kde.org/show_bug.cgi?id=436533#c26 0048 0049 set(JpegXL_Conf ${JpegXL_Conf} 0050 -DCMAKE_CXX_FLAGS="-DHWY_COMPILE_ONLY_SCALAR" 0051 ) 0052 0053 endif() 0054 0055 JoinListAsString("${JpegXL_Conf}" " " BASH_OPTIONS) 0056 0057 if(MINGW) 0058 0059 ExternalProject_Add(ext_libjxl 0060 DOWNLOAD_DIR ${EXTERNALS_DOWNLOAD_DIR} 0061 0062 GIT_REPOSITORY https://github.com/libjxl/libjxl.git 0063 GIT_TAG v0.8.2 0064 0065 CONFIGURE_COMMAND git submodule update --init --recursive --depth 1 --recommend-shallow && 0066 cp -f ${CMAKE_CURRENT_SOURCE_DIR}/../../../../bootstrap.mxe <SOURCE_DIR>/. && 0067 <SOURCE_DIR>/bootstrap.mxe ${MXE_BUILDROOT} RelWithDebInfo ${BASH_OPTIONS} 0068 0069 BUILD_COMMAND cd <SOURCE_DIR>/build.mxe && $(MAKE) -j 0070 0071 INSTALL_COMMAND cd <SOURCE_DIR>/build.mxe && $(MAKE) install/fast 0072 0073 BUILD_IN_SOURCE 1 0074 0075 UPDATE_COMMAND "" 0076 ALWAYS 0 0077 ) 0078 0079 elseif(APPLE) 0080 0081 ExternalProject_Add(ext_libjxl 0082 DOWNLOAD_DIR ${EXTERNALS_DOWNLOAD_DIR} 0083 0084 # To use official release tarball 0085 0086 GIT_REPOSITORY https://github.com/libjxl/libjxl.git 0087 GIT_TAG v0.8.2 0088 0089 CONFIGURE_COMMAND git submodule update --init --recursive --depth 1 --recommend-shallow && 0090 cp -f ${CMAKE_CURRENT_SOURCE_DIR}/../../../../bootstrap.macports <SOURCE_DIR>/. && 0091 <SOURCE_DIR>/bootstrap.macports ${PREFIX_ext_libjxl} RelWithDebInfo x86_64 ${BASH_OPTIONS} 0092 0093 BUILD_COMMAND cd <SOURCE_DIR>/build && $(MAKE) 0094 0095 INSTALL_COMMAND cd <SOURCE_DIR>/build && $(MAKE) install/fast 0096 0097 BUILD_IN_SOURCE 1 0098 0099 UPDATE_COMMAND "" 0100 ALWAYS 0 0101 ) 0102 0103 else() # Linux 0104 0105 ExternalProject_Add(ext_libjxl 0106 DOWNLOAD_DIR ${EXTERNALS_DOWNLOAD_DIR} 0107 0108 GIT_REPOSITORY https://github.com/libjxl/libjxl.git 0109 GIT_TAG v0.8.2 0110 0111 CONFIGURE_COMMAND git submodule update --init --recursive --depth 1 --recommend-shallow && 0112 $(CMAKE_COMMAND) . -DCMAKE_INSTALL_PREFIX=${PREFIX_ext_libjxl} 0113 -DCMAKE_BUILD_TYPE=${GLOBAL_BUILD_TYPE} 0114 -DICONV_INCLUDE_DIR=${PREFIX_ext_libjxl}/include 0115 ${JpegXL_Conf} 0116 ${GLOBAL_PROFILE} 0117 0118 BUILD_COMMAND cd <SOURCE_DIR> && $(MAKE) 0119 0120 INSTALL_COMMAND cd <SOURCE_DIR> && $(MAKE) install/fast 0121 0122 BUILD_IN_SOURCE 1 0123 0124 UPDATE_COMMAND "" 0125 ALWAYS 0 0126 ) 0127 0128 endif()