Warning, /graphics/digikam/project/bundles/3rdparty/ext_heif/CMakeLists.txt is written in an unsupported language. File is not indexed.
0001 # Script to build libheif for digiKam bundle. 0002 # 0003 # SPDX-FileCopyrightText: 2015-2024 by Gilles Caulier <caulier dot gilles at gmail dot com> 0004 # 0005 # SPDX-License-Identifier: BSD-3-Clause 0006 # 0007 # 0008 0009 set(PREFIX_ext_heif "${EXTPREFIX}") 0010 0011 set(Heif_Conf -DBUILD_SHARED_LIBS=ON 0012 -DENABLE_PLUGIN_LOADING=OFF 0013 -DWITH_LIBDE265=ON 0014 -DWITH_X265=ON 0015 -DWITH_AOM_DECODER=OFF 0016 -DWITH_AOM_ENCODER=OFF 0017 -DWITH_RAV1E=OFF 0018 -DWITH_RAV1E_PLUGIN=OFF 0019 -DWITH_SvtEnc=OFF 0020 -DWITH_SvtEnc_PLUGIN=OFF 0021 -DWITH_DAV1D=OFF 0022 -DWITH_EXAMPLES=OFF 0023 ) 0024 0025 JoinListAsString("${Heif_Conf}" " " BASH_OPTIONS) 0026 0027 if(MINGW) 0028 0029 ExternalProject_Add(ext_heif 0030 0031 DOWNLOAD_DIR ${EXTERNALS_DOWNLOAD_DIR} 0032 GIT_REPOSITORY https://github.com/strukturag/libheif.git 0033 GIT_TAG v1.15.2 0034 0035 PATCH_COMMAND ${PATCH_COMMAND} -p1 -i ${CMAKE_CURRENT_SOURCE_DIR}/heif-lib-only.patch 0036 0037 CONFIGURE_COMMAND cp -f ${CMAKE_CURRENT_SOURCE_DIR}/../../../scripts/create_manifest.sh <SOURCE_DIR>/. && 0038 cd <SOURCE_DIR> && 0039 <SOURCE_DIR>/create_manifest.sh ${EXTERNALS_DOWNLOAD_DIR} heif && 0040 cp -f ${CMAKE_CURRENT_SOURCE_DIR}/../../../../bootstrap.mxe <SOURCE_DIR>/. && 0041 <SOURCE_DIR>/bootstrap.mxe ${MXE_BUILDROOT} RelWithDebInfo ${BASH_OPTIONS} 0042 0043 BUILD_COMMAND cd <SOURCE_DIR>/build.mxe && $(MAKE) 0044 0045 BUILD_IN_SOURCE 1 0046 0047 INSTALL_COMMAND cd <SOURCE_DIR>/build.mxe && $(MAKE) install/fast 0048 0049 UPDATE_COMMAND "" 0050 ALWAYS 0 0051 ) 0052 0053 elseif(APPLE) 0054 0055 ExternalProject_Add(ext_heif 0056 0057 DOWNLOAD_DIR ${EXTERNALS_DOWNLOAD_DIR} 0058 GIT_REPOSITORY https://github.com/strukturag/libheif.git 0059 GIT_TAG v1.15.2 0060 0061 PATCH_COMMAND ${PATCH_COMMAND} -p1 -i ${CMAKE_CURRENT_SOURCE_DIR}/heif-lib-only.patch 0062 0063 CONFIGURE_COMMAND cp -f ${CMAKE_CURRENT_SOURCE_DIR}/../../../scripts/create_manifest.sh <SOURCE_DIR>/. && 0064 cd <SOURCE_DIR> && 0065 <SOURCE_DIR>/create_manifest.sh ${EXTERNALS_DOWNLOAD_DIR} heif && 0066 cp -f ${CMAKE_CURRENT_SOURCE_DIR}/../../../../bootstrap.macports <SOURCE_DIR>/. && 0067 <SOURCE_DIR>/bootstrap.macports ${PREFIX_ext_heif} RelWithDebInfo x86_64 ${Heif_conf} 0068 0069 BUILD_COMMAND cd <SOURCE_DIR>/build && $(MAKE) 0070 0071 BUILD_IN_SOURCE 1 0072 0073 INSTALL_COMMAND cd <SOURCE_DIR>/build && $(MAKE) install/fast 0074 0075 UPDATE_COMMAND "" 0076 ALWAYS 0 0077 ) 0078 0079 else() # Linux 0080 0081 ExternalProject_Add(ext_heif 0082 0083 DOWNLOAD_DIR ${EXTERNALS_DOWNLOAD_DIR} 0084 GIT_REPOSITORY https://github.com/strukturag/libheif.git 0085 GIT_TAG v1.15.2 0086 0087 PATCH_COMMAND git reset --hard && ${PATCH_COMMAND} -p1 -i ${CMAKE_CURRENT_SOURCE_DIR}/heif-lib-only.patch 0088 0089 CONFIGURE_COMMAND cp -f ${CMAKE_CURRENT_SOURCE_DIR}/../../../scripts/create_manifest.sh <SOURCE_DIR>/. && 0090 cd <SOURCE_DIR> && 0091 <SOURCE_DIR>/create_manifest.sh ${EXTERNALS_DOWNLOAD_DIR} heif && 0092 $(CMAKE_COMMAND) . -DCMAKE_INSTALL_PREFIX=${PREFIX_ext_heif} 0093 -DCMAKE_BUILD_TYPE=${GLOBAL_BUILD_TYPE} 0094 ${GLOBAL_PROFILE} 0095 ${Heif_Conf} 0096 0097 BUILD_IN_SOURCE 1 0098 0099 UPDATE_COMMAND "" 0100 ALWAYS 0 0101 ) 0102 0103 endif()