Files
Brecht Van Lommel f8e78b8236 Refactor: Move Linux/macOS harvest to individual files
More closely matching Windows and easier to update.

Pull Request: https://projects.blender.org/blender/blender/pulls/123196
2024-07-02 16:49:22 +02:00

50 lines
1.4 KiB
CMake

# SPDX-FileCopyrightText: 2022-2023 Blender Authors
#
# SPDX-License-Identifier: GPL-2.0-or-later
if(BLENDER_PLATFORM_WINDOWS_ARM)
set(AOM_EXTRA_ARGS_WIN32 -DAOM_TARGET_CPU=generic)
else()
set(AOM_CMAKE_FLAGS ${DEFAULT_CMAKE_FLAGS})
endif()
set(AOM_EXTRA_ARGS
-DENABLE_TESTDATA=OFF
-DENABLE_TESTS=OFF
-DENABLE_TOOLS=OFF
-DENABLE_EXAMPLES=OFF
${AOM_EXTRA_ARGS_WIN32}
)
# This is slightly different from all other deps in the way that
# aom uses cmake as a build system, but still needs the environment setup
# to include perl so we manually setup the environment and call
# cmake directly for the configure, build and install commands.
ExternalProject_Add(external_aom
URL file://${PACKAGE_DIR}/${AOM_FILE}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH ${AOM_HASH_TYPE}=${AOM_HASH}
PREFIX ${BUILD_DIR}/aom
PATCH_COMMAND ${PATCH_CMD} --verbose -p 1 -N -d
${BUILD_DIR}/aom/src/external_aom <
${PATCH_DIR}/aom.diff
CONFIGURE_COMMAND ${CONFIGURE_ENV} &&
cd ${BUILD_DIR}/aom/src/external_aom-build/ &&
${CMAKE_COMMAND}
-DCMAKE_INSTALL_PREFIX=${LIBDIR}/aom
${AOM_CMAKE_FLAGS}
${AOM_EXTRA_ARGS}
${BUILD_DIR}/aom/src/external_aom/
BUILD_COMMAND ${CMAKE_COMMAND} --build .
INSTALL_COMMAND ${CMAKE_COMMAND} --build . --target install
INSTALL_DIR ${LIBDIR}/aom
)
if(NOT WIN32)
harvest(external_aom aom/lib ffmpeg/lib "*.a")
endif()