Warning, /graphics/digikam/project/bundles/3rdparty/ext_libaom/CMakeLists.txt is written in an unsupported language. File is not indexed.

0001 # Script to build AOM library 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_libaom "${EXTPREFIX}")
0010 
0011 # NOTES:
0012 # - Libaom is installed with Macports under MacOS
0013 
0014 set(AOM_Conf -DENABLE_EXAMPLES=OFF
0015              -DENABLE_TESTS=OFF
0016              -DENABLE_TOOLS=OFF
0017              -DENABLE_DOCS=OFF
0018              -DENABLE_TESTDATA=OFF
0019              -DCONFIG_PIC=1
0020              -DBUILD_SHARED_LIBS=ON
0021 )
0022 
0023 if(MINGW)
0024 
0025     # See bugs #471797 and 471269
0026     set(AOM_Conf ${AOM_Conf}
0027                -DAOM_TARGET_CPU=x86_64
0028                -DAOM_TARGET_SYSTEM=Windows
0029                -DENABLE_MMX=ON
0030                -DENABLE_SSE=ON
0031                -DENABLE_SSE2=OFF
0032                -DENABLE_SSE3=OFF
0033                -DENABLE_SSE4_1=OFF
0034                -DENABLE_SSE4_2=OFF
0035                -DENABLE_SSSE3=OFF
0036     )
0037 
0038 endif()
0039 
0040 JoinListAsString("${AOM_Conf}" " " BASH_OPTIONS_AOM)
0041 
0042 if(MINGW)
0043 
0044     ExternalProject_Add(ext_libaom
0045 
0046         DOWNLOAD_DIR ${EXTERNALS_DOWNLOAD_DIR}
0047         GIT_REPOSITORY https://aomedia.googlesource.com/aom
0048         GIT_TAG v3.7.0
0049 
0050         CONFIGURE_COMMAND cp -f ${CMAKE_CURRENT_SOURCE_DIR}/../../../../bootstrap.mxe <SOURCE_DIR>/. &&
0051                           <SOURCE_DIR>/bootstrap.mxe ${MXE_BUILDROOT} RelWithDebInfo ${BASH_OPTIONS_AOM}
0052 
0053         BUILD_COMMAND cd <SOURCE_DIR>/build.mxe && $(MAKE)
0054 
0055         BUILD_IN_SOURCE 1
0056 
0057         INSTALL_COMMAND cd <SOURCE_DIR>/build.mxe && $(MAKE) install/fast
0058 
0059         UPDATE_COMMAND ""
0060         ALWAYS 0
0061     )
0062 
0063 else() # Linux
0064 
0065     ExternalProject_Add(ext_libaom
0066 
0067         DOWNLOAD_DIR ${EXTERNALS_DOWNLOAD_DIR}
0068         GIT_REPOSITORY https://aomedia.googlesource.com/aom
0069         GIT_TAG v3.7.0
0070 
0071         CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${PREFIX_libaom}
0072                    -DCMAKE_BUILD_TYPE=${GLOBAL_BUILD_TYPE}
0073                    ${GLOBAL_PROFILE}
0074                    ${AOM_Conf}
0075 
0076         BUILD_IN_SOURCE 0
0077 
0078         UPDATE_COMMAND ""
0079         ALWAYS 0
0080     )
0081 
0082 endif()