diff options
author | trav90 <travawine@palemoon.org> | 2018-10-17 05:59:08 -0500 |
---|---|---|
committer | trav90 <travawine@palemoon.org> | 2018-10-17 05:59:08 -0500 |
commit | df9477dfa60ebb5d31bc142e58ce46535c17abce (patch) | |
tree | c4fdd5d1b09d08c0514f208246260fc87372cb56 /third_party/aom/build/cmake | |
parent | 0cc51bc106250988cc3b89cb5d743a5af52cd35a (diff) | |
download | UXP-df9477dfa60ebb5d31bc142e58ce46535c17abce.tar UXP-df9477dfa60ebb5d31bc142e58ce46535c17abce.tar.gz UXP-df9477dfa60ebb5d31bc142e58ce46535c17abce.tar.lz UXP-df9477dfa60ebb5d31bc142e58ce46535c17abce.tar.xz UXP-df9477dfa60ebb5d31bc142e58ce46535c17abce.zip |
Update aom to slightly newer commit ID
Diffstat (limited to 'third_party/aom/build/cmake')
-rw-r--r-- | third_party/aom/build/cmake/aom_config_defaults.cmake | 39 | ||||
-rw-r--r-- | third_party/aom/build/cmake/aom_configure.cmake | 87 | ||||
-rw-r--r-- | third_party/aom/build/cmake/aom_optimization.cmake | 10 | ||||
-rw-r--r-- | third_party/aom/build/cmake/compiler_flags.cmake | 5 | ||||
-rw-r--r-- | third_party/aom/build/cmake/compiler_tests.cmake | 5 | ||||
-rw-r--r-- | third_party/aom/build/cmake/dist.cmake | 51 | ||||
-rw-r--r-- | third_party/aom/build/cmake/generate_aom_config_templates.cmake | 22 | ||||
-rw-r--r-- | third_party/aom/build/cmake/msvc_runtime.cmake | 4 | ||||
-rw-r--r-- | third_party/aom/build/cmake/rtcd_config.cmake | 137 | ||||
-rw-r--r-- | third_party/aom/build/cmake/toolchains/armv7-ios.cmake | 4 | ||||
-rw-r--r-- | third_party/aom/build/cmake/toolchains/armv7s-ios.cmake | 4 |
11 files changed, 189 insertions, 179 deletions
diff --git a/third_party/aom/build/cmake/aom_config_defaults.cmake b/third_party/aom/build/cmake/aom_config_defaults.cmake index 5c2bc5801..cd6b5ab48 100644 --- a/third_party/aom/build/cmake/aom_config_defaults.cmake +++ b/third_party/aom/build/cmake/aom_config_defaults.cmake @@ -20,7 +20,6 @@ set(ARCH_MIPS 0 CACHE BOOL "Enables MIPS architecture.") set(ARCH_X86 0 CACHE BOOL "Enables X86 architecture.") set(ARCH_X86_64 0 CACHE BOOL "Enables X86_64 architecture.") set(HAVE_EDSP 0 CACHE BOOL "Enables EDSP optimizations.") -set(HAVE_MEDIA 0 CACHE BOOL "Enables MEDIA optimizations.") set(HAVE_NEON 0 CACHE BOOL "Enables NEON intrinsics optimizations.") set(HAVE_NEON_ASM 0 CACHE BOOL "Enables NEON assembly optimizations.") set(HAVE_MIPS32 0 CACHE BOOL "Enables MIPS32 optimizations.") @@ -42,7 +41,6 @@ set(HAVE_UNISTD_H 0 CACHE BOOL "Internal flag, unistd.h present for target.") set(HAVE_WXWIDGETS 0 CACHE BOOL "WxWidgets present.") set(CONFIG_DEPENDENCY_TRACKING 1 CACHE BOOL "Internal flag.") set(CONFIG_EXTERNAL_BUILD 0 CACHE BOOL "Internal flag.") -set(CONFIG_INSTALL_DOCS 0 CACHE BOOL "Internal flag.") set(CONFIG_INSTALL_BINS 0 CACHE BOOL "Internal flag.") set(CONFIG_INSTALL_LIBS 0 CACHE BOOL "Internal flag.") set(CONFIG_INSTALL_SRCS 0 CACHE BOOL "Internal flag.") @@ -63,8 +61,6 @@ set(CONFIG_INTERNAL_STATS 0 CACHE BOOL "Internal flag.") set(CONFIG_AV1_ENCODER 1 CACHE BOOL "Enable AV1 encoder.") set(CONFIG_AV1_DECODER 1 CACHE BOOL "Enable AV1 decoder.") set(CONFIG_AV1 1 CACHE BOOL "Internal flag.") -set(CONFIG_ENCODERS 1 CACHE BOOL "Enable encoding.") -set(CONFIG_DECODERS 1 CACHE BOOL "Enable decoding.") set(CONFIG_STATIC_MSVCRT 0 CACHE BOOL "Internal flag.") set(CONFIG_SPATIAL_RESAMPLING 1 CACHE BOOL "Internal flag.") set(CONFIG_REALTIME_ONLY 0 CACHE BOOL "Internal flag.") @@ -84,70 +80,67 @@ set(CONFIG_DECODE_PERF_TESTS 0 CACHE BOOL "Internal flag.") set(CONFIG_ENCODE_PERF_TESTS 0 CACHE BOOL "Internal flag.") set(CONFIG_COEFFICIENT_RANGE_CHECKING 0 CACHE BOOL "Internal flag.") set(CONFIG_LOWBITDEPTH 1 CACHE BOOL "Internal flag.") -set(CONFIG_HIGHBITDEPTH 0 CACHE BOOL "Internal flag.") +set(CONFIG_HIGHBITDEPTH 1 CACHE BOOL "Internal flag.") set(CONFIG_EXPERIMENTAL 0 CACHE BOOL "Internal flag.") set(CONFIG_SIZE_LIMIT 0 CACHE BOOL "Internal flag.") -set(CONFIG_AOM_QM 0 CACHE BOOL "Internal flag.") set(CONFIG_FP_MB_STATS 0 CACHE BOOL "Internal flag.") set(CONFIG_CDEF 1 CACHE BOOL "Internal flag.") -set(CONFIG_VAR_TX 0 CACHE BOOL "Internal flag.") +set(CONFIG_VAR_TX 1 CACHE BOOL "Internal flag.") set(CONFIG_RECT_TX 1 CACHE BOOL "Internal flag.") -set(CONFIG_REF_MV 1 CACHE BOOL "Internal flag.") +set(CONFIG_RECT_TX_EXT 0 CACHE BOOL "Internal flag.") set(CONFIG_TPL_MV 0 CACHE BOOL "Internal flag.") set(CONFIG_DUAL_FILTER 1 CACHE BOOL "Internal flag.") set(CONFIG_CONVOLVE_ROUND 0 CACHE BOOL "Internal flag.") set(CONFIG_COMPOUND_ROUND 0 CACHE BOOL "Internal flag.") -set(CONFIG_EXT_TX 0 CACHE BOOL "Internal flag.") +set(CONFIG_EXT_TX 1 CACHE BOOL "Internal flag.") +set(CONFIG_DPCM_INTRA 0 CACHE BOOL "Internal flag.") set(CONFIG_TX64X64 0 CACHE BOOL "Internal flag.") -set(CONFIG_SUB8X8_MC 0 CACHE BOOL "Internal flag.") set(CONFIG_EXT_INTRA 1 CACHE BOOL "Internal flag.") set(CONFIG_INTRA_INTERP 0 CACHE BOOL "Internal flag.") set(CONFIG_FILTER_INTRA 0 CACHE BOOL "Internal flag.") +set(CONFIG_INTRA_EDGE 0 CACHE BOOL "Internal flag.") set(CONFIG_INTRABC 0 CACHE BOOL "Internal flag.") set(CONFIG_EXT_INTER 0 CACHE BOOL "Internal flag.") set(CONFIG_INTERINTRA 0 CACHE BOOL "Internal flag.") set(CONFIG_WEDGE 0 CACHE BOOL "Internal flag.") set(CONFIG_COMPOUND_SEGMENT 0 CACHE BOOL "Internal flag.") set(CONFIG_EXT_REFS 1 CACHE BOOL "Internal flag.") -set(CONFIG_GLOBAL_MOTION 0 CACHE BOOL "Internal flag.") +set(CONFIG_GLOBAL_MOTION 1 CACHE BOOL "Internal flag.") set(CONFIG_NEW_QUANT 0 CACHE BOOL "Internal flag.") set(CONFIG_SUPERTX 0 CACHE BOOL "Internal flag.") set(CONFIG_ANS 0 CACHE BOOL "Internal flag.") -set(CONFIG_EC_MULTISYMBOL 1 CACHE BOOL "Internal flag.") -set(CONFIG_NEW_TOKENSET 1 CACHE BOOL "Internal flag.") set(CONFIG_LOOP_RESTORATION 0 CACHE BOOL "Internal flag.") set(CONFIG_EXT_PARTITION 0 CACHE BOOL "Internal flag.") set(CONFIG_EXT_PARTITION_TYPES 0 CACHE BOOL "Internal flag.") set(CONFIG_UNPOISON_PARTITION_CTX 0 CACHE BOOL "Internal flag.") set(CONFIG_EXT_TILE 0 CACHE BOOL "Internal flag.") -set(CONFIG_MOTION_VAR 0 CACHE BOOL "Internal flag.") +set(CONFIG_MOTION_VAR 1 CACHE BOOL "Internal flag.") set(CONFIG_NCOBMC 0 CACHE BOOL "Internal flag.") -set(CONFIG_WARPED_MOTION 0 CACHE BOOL "Internal flag.") +set(CONFIG_WARPED_MOTION 1 CACHE BOOL "Internal flag.") set(CONFIG_Q_ADAPT_PROBS 0 CACHE BOOL "Internal flag.") -set(CONFIG_SUBFRAME_PROB_UPDATE 0 CACHE BOOL "Internal flag.") set(CONFIG_BITSTREAM_DEBUG 0 CACHE BOOL "Internal flag.") set(CONFIG_ALT_INTRA 1 CACHE BOOL "Internal flag.") set(CONFIG_PALETTE 1 CACHE BOOL "Internal flag.") set(CONFIG_PALETTE_DELTA_ENCODING 0 CACHE BOOL "Internal flag.") -set(CONFIG_DAALA_EC 1 CACHE BOOL "Internal flag.") set(CONFIG_RAWBITS 0 CACHE BOOL "Internal flag.") -set(CONFIG_EC_SMALLMUL 0 CACHE BOOL "Internal flag.") +set(CONFIG_EC_SMALLMUL 1 CACHE BOOL "Internal flag.") set(CONFIG_PVQ 0 CACHE BOOL "Internal flag.") set(CONFIG_CFL 0 CACHE BOOL "Internal flag.") set(CONFIG_XIPHRC 0 CACHE BOOL "Internal flag.") set(CONFIG_CB4X4 1 CACHE BOOL "Internal flag.") set(CONFIG_CHROMA_2X2 0 CACHE BOOL "Internal flag.") +set(CONFIG_CHROMA_SUB8X8 1 CACHE BOOL "Internal flag.") set(CONFIG_FRAME_SIZE 0 CACHE BOOL "Internal flag.") set(CONFIG_DELTA_Q 1 CACHE BOOL "Internal flag.") -set(CONFIG_EXT_DELTA_Q 0 CACHE BOOL "Internal flag.") +set(CONFIG_EXT_DELTA_Q 1 CACHE BOOL "Internal flag.") set(CONFIG_ADAPT_SCAN 0 CACHE BOOL "Internal flag.") set(CONFIG_FILTER_7BIT 1 CACHE BOOL "Internal flag.") set(CONFIG_PARALLEL_DEBLOCKING 0 CACHE BOOL "Internal flag.") set(CONFIG_PARALLEL_DEBLOCKING_15TAP 0 CACHE BOOL "Internal flag.") -set(CONFIG_LOOPFILTERING_ACROSS_TILES 0 CACHE BOOL "Internal flag.") +set(CONFIG_LOOPFILTERING_ACROSS_TILES 1 CACHE BOOL "Internal flag.") set(CONFIG_TILE_GROUPS 1 CACHE BOOL "Internal flag.") set(CONFIG_EC_ADAPT 1 CACHE BOOL "Internal flag.") -set(CONFIG_TEMPMV_SIGNALING 0 CACHE BOOL "Internal flag.") +set(CONFIG_TEMPMV_SIGNALING 1 CACHE BOOL "Internal flag.") set(CONFIG_RD_DEBUG 0 CACHE BOOL "Internal flag.") set(CONFIG_REFERENCE_BUFFER 1 CACHE BOOL "Internal flag.") set(CONFIG_COEF_INTERLEAVE 0 CACHE BOOL "Internal flag.") @@ -164,4 +157,8 @@ set(CONFIG_MV_COMPRESS 1 CACHE BOOL "Internal flag.") set(CONFIG_FRAME_SUPERRES 0 CACHE BOOL "Internal flag.") set(CONFIG_NEW_MULTISYMBOL 0 CACHE BOOL "Internal flag.") set(CONFIG_COMPOUND_SINGLEREF 0 CACHE BOOL "Internal flag.") +set(CONFIG_AOM_QM 0 CACHE BOOL "Internal flag.") +set(CONFIG_ONE_SIDED_COMPOUND 1 CACHE BOOL "Internal flag.") +set(CONFIG_SMOOTH_HV 0 CACHE BOOL "Internal flag.") +set(CONFIG_VAR_REFS 0 CACHE BOOL "Internal flag.") set(CONFIG_ANALYZER 0 CACHE BOOL "Internal flag.") diff --git a/third_party/aom/build/cmake/aom_configure.cmake b/third_party/aom/build/cmake/aom_configure.cmake index 3c9402d0b..0fa2cce0e 100644 --- a/third_party/aom/build/cmake/aom_configure.cmake +++ b/third_party/aom/build/cmake/aom_configure.cmake @@ -8,6 +8,9 @@ ## Media Patent License 1.0 was not distributed with this source code in the ## PATENTS file, you can obtain it at www.aomedia.org/license/patent. ## +if (NOT AOM_BUILD_CMAKE_AOM_CONFIGURE_CMAKE_) +set(AOM_BUILD_CMAKE_AOM_CONFIGURE_CMAKE_ 1) + include(FindGit) include(FindPerl) include(FindThreads) @@ -89,7 +92,13 @@ endif () if ("${AOM_TARGET_CPU}" STREQUAL "x86" OR "${AOM_TARGET_CPU}" STREQUAL "x86_64") # TODO(tomfinegan): Support nasm at least as well as the existing build # system. - find_program(AS_EXECUTABLE yasm $ENV{YASM_PATH}) + if (ENABLE_NASM) + find_program(AS_EXECUTABLE nasm $ENV{NASM_PATH}) + set(AOM_AS_FLAGS ${AOM_AS_FLAGS} -Ox) + else () + find_program(AS_EXECUTABLE yasm $ENV{YASM_PATH}) + endif () + if (NOT AS_EXECUTABLE) message(FATAL_ERROR "Unable to find yasm. To build without optimizations, " "add -DAOM_TARGET_CPU=generic to your cmake command line.") @@ -115,6 +124,30 @@ endif () include("${AOM_ROOT}/build/cmake/cpu.cmake") +if (ENABLE_CCACHE) + find_program(CCACHE "ccache") + if (NOT "${CCACHE}" STREQUAL "") + set(CMAKE_C_COMPILER_LAUNCHER "${CCACHE}") + set(CMAKE_CXX_COMPILER_LAUNCHER "${CCACHE}") + else () + message("--- Cannot find ccache, ENABLE_CCACHE ignored.") + endif () +endif () + +if (ENABLE_DISTCC) + find_program(DISTCC "distcc") + if (NOT "${DISTCC}" STREQUAL "") + set(CMAKE_C_COMPILER_LAUNCHER "${DISTCC}") + set(CMAKE_CXX_COMPILER_LAUNCHER "${DISTCC}") + else () + message("--- Cannot find distcc, ENABLE_DISTCC ignored.") + endif () +endif () + +if (NOT CONFIG_AV1_DECODER AND NOT CONFIG_AV1_ENCODER) + message(FATAL_ERROR "Decoder and encoder disabled, nothing to build.") +endif () + # Test compiler flags. if (MSVC) add_compiler_flag_if_supported("/W3") @@ -191,11 +224,6 @@ if (CONFIG_ANALYZER) endif () endif () -if (CONFIG_ANS AND CONFIG_DAALA_EC) - message(FATAL_ERROR - "CONFIG_ANS and CONFIG_DAALA_EC cannot be enabled together.") -endif () - if (NOT MSVC) aom_push_var(CMAKE_REQUIRED_LIBRARIES "m") aom_check_c_compiles("fenv_check" @@ -207,6 +235,13 @@ if (NOT MSVC) aom_pop_var(CMAKE_REQUIRED_LIBRARIES) endif() +set(AOM_LIB_LINK_TYPE PUBLIC) +if (EMSCRIPTEN) + # Avoid CMake generation time errors resulting from collisions with the form + # of target_link_libraries() used by Emscripten.cmake. + unset(AOM_LIB_LINK_TYPE) +endif () + # Generate aom_config templates. set(aom_config_asm_template "${AOM_CONFIG_DIR}/aom_config.asm.cmake") set(aom_config_h_template "${AOM_CONFIG_DIR}/aom_config.h.cmake") @@ -244,9 +279,9 @@ find_package(Perl) if (NOT PERL_FOUND) message(FATAL_ERROR "Perl is required to build libaom.") endif () -configure_file( - "${AOM_ROOT}/build/cmake/rtcd_config.cmake" - "${AOM_CONFIG_DIR}/${AOM_TARGET_CPU}_rtcd_config.rtcd") + +configure_file("${AOM_CONFIG_DIR}/rtcd_config.cmake" + "${AOM_CONFIG_DIR}/${AOM_TARGET_CPU}_rtcd_config.rtcd") set(AOM_RTCD_CONFIG_FILE_LIST "${AOM_ROOT}/aom_dsp/aom_dsp_rtcd_defs.pl" @@ -304,3 +339,37 @@ execute_process( COMMAND ${PERL_EXECUTABLE} "${AOM_ROOT}/build/cmake/aom_version.pl" --version_data=${AOM_GIT_DESCRIPTION} --version_filename=${AOM_CONFIG_DIR}/aom_version.h) + +# Generate aom.pc (pkg-config file). +if (NOT MSVC) + # Extract the version string from aom_version.h + file(STRINGS "${AOM_CONFIG_DIR}/aom_version.h" aom_version + REGEX "VERSION_STRING_NOSP") + string(REPLACE "#define VERSION_STRING_NOSP \"v" "" aom_version + "${aom_version}") + string(REPLACE "\"" "" aom_version "${aom_version}") + + # Write pkg-config info. + set(prefix "${CMAKE_INSTALL_PREFIX}") + set(pkgconfig_file "${AOM_CONFIG_DIR}/aom.pc") + string(TOLOWER ${CMAKE_PROJECT_NAME} pkg_name) + file(WRITE "${pkgconfig_file}" "# libaom pkg-config.\n") + file(APPEND "${pkgconfig_file}" "prefix=${prefix}\n") + file(APPEND "${pkgconfig_file}" "exec_prefix=${prefix}/bin\n") + file(APPEND "${pkgconfig_file}" "libdir=${prefix}/lib\n") + file(APPEND "${pkgconfig_file}" "includedir=${prefix}/include\n\n") + file(APPEND "${pkgconfig_file}" "Name: ${pkg_name}\n") + file(APPEND "${pkgconfig_file}" "Description: AV1 codec library.\n") + file(APPEND "${pkgconfig_file}" "Version: ${aom_version}\n") + file(APPEND "${pkgconfig_file}" "Requires:\n") + file(APPEND "${pkgconfig_file}" "Conflicts:\n") + file(APPEND "${pkgconfig_file}" "Libs: -L${prefix}/lib -l${pkg_name} -lm\n") + if (CONFIG_MULTITHREAD AND HAVE_PTHREAD_H) + file(APPEND "${pkgconfig_file}" "Libs.private: -lm -lpthread\n") + else () + file(APPEND "${pkgconfig_file}" "Libs.private: -lm\n") + endif () + file(APPEND "${pkgconfig_file}" "Cflags: -I${prefix}/include\n") +endif () + +endif () # AOM_BUILD_CMAKE_AOM_CONFIGURE_CMAKE_ diff --git a/third_party/aom/build/cmake/aom_optimization.cmake b/third_party/aom/build/cmake/aom_optimization.cmake index e2b0ba07e..5a3865281 100644 --- a/third_party/aom/build/cmake/aom_optimization.cmake +++ b/third_party/aom/build/cmake/aom_optimization.cmake @@ -75,7 +75,8 @@ function (get_asm_obj_format out_format) set(objformat "macho64") elseif ("${AOM_TARGET_SYSTEM}" STREQUAL "Linux") set(objformat "elf64") - elseif ("${AOM_TARGET_SYSTEM}" STREQUAL "Windows") + elseif ("${AOM_TARGET_SYSTEM}" STREQUAL "MSYS" OR + "${AOM_TARGET_SYSTEM}" STREQUAL "Windows") set(objformat "win64") else () message(FATAL_ERROR "Unknown obj format: ${AOM_TARGET_SYSTEM}") @@ -85,7 +86,8 @@ function (get_asm_obj_format out_format) set(objformat "macho32") elseif ("${AOM_TARGET_SYSTEM}" STREQUAL "Linux") set(objformat "elf32") - elseif ("${AOM_TARGET_SYSTEM}" STREQUAL "Windows") + elseif ("${AOM_TARGET_SYSTEM}" STREQUAL "MSYS" OR + "${AOM_TARGET_SYSTEM}" STREQUAL "Windows") set(objformat "win32") else () message(FATAL_ERROR "Unknown obj format: ${AOM_TARGET_SYSTEM}") @@ -120,7 +122,7 @@ function (add_asm_library lib_name asm_sources dependent_target) add_custom_command(OUTPUT "${asm_object}" COMMAND ${AS_EXECUTABLE} ARGS ${AOM_AS_FLAGS} - -I${AOM_ROOT} -I${AOM_CONFIG_DIR} + -I${AOM_ROOT}/ -I${AOM_CONFIG_DIR}/ -o "${asm_object}" "${asm_source}" DEPENDS "${asm_source}" COMMENT "Building ASM object ${asm_object}" @@ -141,7 +143,7 @@ function (add_asm_library lib_name asm_sources dependent_target) "void ${lib_name}_dummy_function(void) {}\n") target_sources(${lib_name} PUBLIC ${dummy_c_file}) - target_link_libraries(${dependent_target} PRIVATE ${lib_name}) + target_link_libraries(${dependent_target} ${AOM_LIB_LINK_TYPE} ${lib_name}) # Add the new lib target to the global list of aom library targets. list(APPEND AOM_LIB_TARGETS ${lib_name}) diff --git a/third_party/aom/build/cmake/compiler_flags.cmake b/third_party/aom/build/cmake/compiler_flags.cmake index beb217abc..c9fc69b92 100644 --- a/third_party/aom/build/cmake/compiler_flags.cmake +++ b/third_party/aom/build/cmake/compiler_flags.cmake @@ -8,6 +8,9 @@ ## Media Patent License 1.0 was not distributed with this source code in the ## PATENTS file, you can obtain it at www.aomedia.org/license/patent. ## +if (NOT AOM_BUILD_CMAKE_COMPILER_FLAGS_CMAKE_) +set(AOM_BUILD_CMAKE_COMPILER_FLAGS_CMAKE_ 1) + include(CheckCCompilerFlag) include(CheckCXXCompilerFlag) @@ -216,3 +219,5 @@ function (append_exe_linker_flag flag) "" FORCE) endif () endfunction () + +endif () # AOM_BUILD_CMAKE_COMPILER_FLAGS_CMAKE_ diff --git a/third_party/aom/build/cmake/compiler_tests.cmake b/third_party/aom/build/cmake/compiler_tests.cmake index e763597a2..89f0bc12c 100644 --- a/third_party/aom/build/cmake/compiler_tests.cmake +++ b/third_party/aom/build/cmake/compiler_tests.cmake @@ -8,6 +8,9 @@ ## Media Patent License 1.0 was not distributed with this source code in the ## PATENTS file, you can obtain it at www.aomedia.org/license/patent. ## +if (NOT AOM_BUILD_CMAKE_COMPILER_TESTS_CMAKE_) +set(AOM_BUILD_CMAKE_COMPILER_TESTS_CMAKE_ 1) + include(CheckCSourceCompiles) include(CheckCXXSourceCompiles) @@ -131,3 +134,5 @@ function (aom_get_inline result) set(${result} "__inline" PARENT_SCOPE) endif () endfunction () + +endif () # AOM_BUILD_CMAKE_COMPILER_TESTS_CMAKE_ diff --git a/third_party/aom/build/cmake/dist.cmake b/third_party/aom/build/cmake/dist.cmake new file mode 100644 index 000000000..0de68a44d --- /dev/null +++ b/third_party/aom/build/cmake/dist.cmake @@ -0,0 +1,51 @@ +## +## Copyright (c) 2017, Alliance for Open Media. All rights reserved +## +## This source code is subject to the terms of the BSD 2 Clause License and +## the Alliance for Open Media Patent License 1.0. If the BSD 2 Clause License +## was not distributed with this source code in the LICENSE file, you can +## obtain it at www.aomedia.org/license/software. If the Alliance for Open +## Media Patent License 1.0 was not distributed with this source code in the +## PATENTS file, you can obtain it at www.aomedia.org/license/patent. +## +cmake_minimum_required(VERSION 3.5) + +# Converts spaces in $in_string to semicolons and writes the output to +# $out_string. In CMake's eyes this converts the input string to a list. +function (listify_string in_string out_string) + string(REPLACE " " ";" ${out_string} ${in_string}) + set(${out_string} "${${out_string}}" PARENT_SCOPE) +endfunction () + +set(REQUIRED_ARGS "AOM_ROOT" "AOM_CONFIG_DIR" "AOM_DIST_DIR" "AOM_DIST_EXAMPLES" + "AOM_DIST_APPS" "AOM_DIST_INCLUDES" "AOM_DIST_LIBS" "ENABLE_DOCS") + +foreach (arg ${REQUIRED_ARGS}) + if ("${${arg}}" STREQUAL "") + message(FATAL_ERROR "${arg} must not be empty.") + endif () +endforeach () + +if (ENABLE_DOCS) + file(INSTALL "${AOM_CONFIG_DIR}/docs" DESTINATION "${AOM_DIST_DIR}") +endif () + +listify_string("${AOM_DIST_EXAMPLES}" "AOM_DIST_EXAMPLES") +foreach (example ${AOM_DIST_EXAMPLES}) + file(INSTALL "${example}" DESTINATION "${AOM_DIST_DIR}/bin/examples") +endforeach () + +listify_string("${AOM_DIST_APPS}" "AOM_DIST_APPS") +foreach (app ${AOM_DIST_APPS}) + file(INSTALL "${app}" DESTINATION "${AOM_DIST_DIR}/bin") +endforeach () + +listify_string("${AOM_DIST_INCLUDES}" "AOM_DIST_INCLUDES") +foreach (inc ${AOM_DIST_INCLUDES}) + file(INSTALL "${inc}" DESTINATION "${AOM_DIST_DIR}/include/aom") +endforeach () + +listify_string("${AOM_DIST_LIBS}" "AOM_DIST_LIBS") +foreach (lib ${AOM_DIST_LIBS}) + file(INSTALL "${lib}" DESTINATION "${AOM_DIST_DIR}/lib") +endforeach () diff --git a/third_party/aom/build/cmake/generate_aom_config_templates.cmake b/third_party/aom/build/cmake/generate_aom_config_templates.cmake index aea4253bb..effa456fc 100644 --- a/third_party/aom/build/cmake/generate_aom_config_templates.cmake +++ b/third_party/aom/build/cmake/generate_aom_config_templates.cmake @@ -37,6 +37,18 @@ set(h_file_header_block \#ifndef AOM_CONFIG_H_ \#define AOM_CONFIG_H_ ") +set(cmake_file_header_block +"## +## Copyright (c) ${year}, Alliance for Open Media. All rights reserved +## +## This source code is subject to the terms of the BSD 2 Clause License and +## the Alliance for Open Media Patent License 1.0. If the BSD 2 Clause License +## was not distributed with this source code in the LICENSE file, you can +## obtain it at www.aomedia.org/license/software. If the Alliance for Open +## Media Patent License 1.0 was not distributed with this source code in the +## PATENTS file, you can obtain it at www.aomedia.org/license/patent. +## +") # Terminates cmake execution when $var_name is an empty string, or the variable # name it contains does not expand to an existing directory. @@ -82,3 +94,13 @@ foreach(cache_var ${cmake_cache_vars}) endif () endforeach () +set(aom_rtcd_config_template "${AOM_CONFIG_DIR}/rtcd_config.cmake") +file(WRITE "${aom_rtcd_config_template}" ${cmake_file_header_block}) +foreach(cache_var ${cmake_cache_vars}) + if (NOT "${cache_var}" MATCHES + "AOM_CONFIG_DIR\|AOM_ROOT\|^CMAKE_\|INLINE\|RESTRICT") + file(APPEND "${aom_rtcd_config_template}" + "${cache_var}=\${RTCD_${cache_var}}\n") + endif () +endforeach () + diff --git a/third_party/aom/build/cmake/msvc_runtime.cmake b/third_party/aom/build/cmake/msvc_runtime.cmake index 0327217b4..3da5f7df6 100644 --- a/third_party/aom/build/cmake/msvc_runtime.cmake +++ b/third_party/aom/build/cmake/msvc_runtime.cmake @@ -8,6 +8,8 @@ ## Media Patent License 1.0 was not distributed with this source code in the ## PATENTS file, you can obtain it at www.aomedia.org/license/patent. ## +if (NOT AOM_BUILD_CMAKE_MSVC_RUNTIME_CMAKE_) +set(AOM_BUILD_CMAKE_MSVC_RUNTIME_CMAKE_ 1) if (MSVC) # CMake defaults to producing code linked to the DLL MSVC runtime. That will @@ -24,3 +26,5 @@ if (MSVC) endforeach (flag_var) endif () endif () + +endif () # AOM_BUILD_CMAKE_MSVC_RUNTIME_CMAKE_ diff --git a/third_party/aom/build/cmake/rtcd_config.cmake b/third_party/aom/build/cmake/rtcd_config.cmake deleted file mode 100644 index cdea3452a..000000000 --- a/third_party/aom/build/cmake/rtcd_config.cmake +++ /dev/null @@ -1,137 +0,0 @@ -## -## Copyright (c) 2017, Alliance for Open Media. All rights reserved -## -## This source code is subject to the terms of the BSD 2 Clause License and -## the Alliance for Open Media Patent License 1.0. If the BSD 2 Clause License -## was not distributed with this source code in the LICENSE file, you can -## obtain it at www.aomedia.org/license/software. If the Alliance for Open -## Media Patent License 1.0 was not distributed with this source code in the -## PATENTS file, you can obtain it at www.aomedia.org/license/patent. -## -ARCH_ARM=${RTCD_ARCH_ARM} -ARCH_MIPS=${RTCD_ARCH_MIPS} -ARCH_X86=${RTCD_ARCH_X86} -ARCH_X86_64=${RTCD_ARCH_X86_64} -HAVE_NEON=${RTCD_HAVE_NEON} -HAVE_NEON_ASM=${RTCD_HAVE_NEON_ASM} -HAVE_MIPS32=${RTCD_HAVE_MIPS32} -HAVE_DSPR2=${RTCD_HAVE_DSPR2} -HAVE_MSA=${RTCD_HAVE_MSA} -HAVE_MIPS64=${RTCD_HAVE_MIPS64} -HAVE_MMX=${RTCD_HAVE_MMX} -HAVE_SSE=${RTCD_HAVE_SSE} -HAVE_SSE2=${RTCD_HAVE_SSE2} -HAVE_SSE3=${RTCD_HAVE_SSE3} -HAVE_SSSE3=${RTCD_HAVE_SSSE3} -HAVE_SSE4_1=${RTCD_HAVE_SSE4_1} -HAVE_AVX=${RTCD_HAVE_AVX} -HAVE_AVX2=${RTCD_HAVE_AVX2} -CONFIG_ACCOUNTING=${RTCD_CONFIG_ACCOUNTING} -CONFIG_INSPECTION=${RTCD_CONFIG_INSPECTION} -CONFIG_ADAPT_SCAN=${RTCD_CONFIG_ADAPT_SCAN} -CONFIG_ALT_INTRA=${RTCD_CONFIG_ALT_INTRA} -CONFIG_ANS=${RTCD_CONFIG_ANS} -CONFIG_HIGHBITDEPTH=${RTCD_CONFIG_HIGHBITDEPTH} -CONFIG_AOM_QM=${RTCD_CONFIG_AOM_QM} -CONFIG_AV1=${RTCD_CONFIG_AV1} -CONFIG_AV1_DECODER=${RTCD_CONFIG_AV1_DECODER} -CONFIG_AV1_ENCODER=${RTCD_CONFIG_AV1_ENCODER} -CONFIG_BIG_ENDIAN=${RTCD_CONFIG_BIG_ENDIAN} -CONFIG_BITSTREAM_DEBUG=${RTCD_CONFIG_BITSTREAM_DEBUG} -CONFIG_CB4X4=${RTCD_CONFIG_CB4X4} -CONFIG_CDEF=${RTCD_CONFIG_CDEF} -CONFIG_CHROMA_2X2=${RTCD_CONFIG_CHROMA_2X2} -CONFIG_CODEC_SRCS=${RTCD_CONFIG_CODEC_SRCS} -CONFIG_COEFFICIENT_RANGE_CHECKING=${RTCD_CONFIG_COEFFICIENT_RANGE_CHECKING} -CONFIG_COEF_INTERLEAVE=${RTCD_CONFIG_COEF_INTERLEAVE} -CONFIG_COMPOUND_SEGMENT=${RTCD_CONFIG_COMPOUND_SEGMENT} -CONFIG_CONVOLVE_ROUND=${RTCD_CONFIG_CONVOLVE_ROUND} -CONFIG_DAALA_DIST=${RTCD_CONFIG_DAALA_DIST} -CONFIG_DAALA_EC=${RTCD_CONFIG_DAALA_EC} -CONFIG_DEBUG=${RTCD_CONFIG_DEBUG} -CONFIG_DEBUG_LIBS=${RTCD_CONFIG_DEBUG_LIBS} -CONFIG_DECODERS=${RTCD_CONFIG_DECODERS} -CONFIG_DECODE_PERF_TESTS=${RTCD_CONFIG_DECODE_PERF_TESTS} -CONFIG_DELTA_Q=${RTCD_CONFIG_DELTA_Q} -CONFIG_DEPENDENCY_TRACKING=${RTCD_CONFIG_DEPENDENCY_TRACKING} -CONFIG_DEPENDENT_HORZTILES=${RTCD_CONFIG_DEPENDENT_HORZTILES} -CONFIG_DUAL_FILTER=${RTCD_CONFIG_DUAL_FILTER} -CONFIG_EC_ADAPT=${RTCD_CONFIG_EC_ADAPT} -CONFIG_EC_MULTISYMBOL=${RTCD_CONFIG_EC_MULTISYMBOL} -CONFIG_ENCODERS=${RTCD_CONFIG_ENCODERS} -CONFIG_ENCODE_PERF_TESTS=${RTCD_CONFIG_ENCODE_PERF_TESTS} -CONFIG_ENTROPY_STATS=${RTCD_CONFIG_ENTROPY_STATS} -CONFIG_ERROR_CONCEALMENT=${RTCD_CONFIG_ERROR_CONCEALMENT} -CONFIG_EXPERIMENTAL=${RTCD_CONFIG_EXPERIMENTAL} -CONFIG_EXTERNAL_BUILD=${RTCD_CONFIG_EXTERNAL_BUILD} -CONFIG_EXT_INTER=${RTCD_CONFIG_EXT_INTER} -CONFIG_EXT_INTRA=${RTCD_CONFIG_EXT_INTRA} -CONFIG_EXT_PARTITION=${RTCD_CONFIG_EXT_PARTITION} -CONFIG_EXT_PARTITION_TYPES=${RTCD_CONFIG_EXT_PARTITION_TYPES} -CONFIG_EXT_REFS=${RTCD_CONFIG_EXT_REFS} -CONFIG_EXT_TILE=${RTCD_CONFIG_EXT_TILE} -CONFIG_EXT_TX=${RTCD_CONFIG_EXT_TX} -CONFIG_FILTER_7BIT=${RTCD_CONFIG_FILTER_7BIT} -CONFIG_FILTER_INTRA=${RTCD_CONFIG_FILTER_INTRA} -CONFIG_FP_MB_STATS=${RTCD_CONFIG_FP_MB_STATS} -CONFIG_FRAME_SIZE=${RTCD_CONFIG_FRAME_SIZE} -CONFIG_GCC=${RTCD_CONFIG_GCC} -CONFIG_GCOV=${RTCD_CONFIG_GCOV} -CONFIG_GLOBAL_MOTION=${RTCD_CONFIG_GLOBAL_MOTION} -CONFIG_GPROF=${RTCD_CONFIG_GPROF} -CONFIG_INSTALL_BINS=${RTCD_CONFIG_INSTALL_BINS} -CONFIG_INSTALL_DOCS=${RTCD_CONFIG_INSTALL_DOCS} -CONFIG_INSTALL_LIBS=${RTCD_CONFIG_INSTALL_LIBS} -CONFIG_INSTALL_SRCS=${RTCD_CONFIG_INSTALL_SRCS} -CONFIG_INTERNAL_STATS=${RTCD_CONFIG_INTERNAL_STATS} -CONFIG_INTRA_INTERP=${RTCD_CONFIG_INTRA_INTERP} -CONFIG_LIBYUV=${RTCD_CONFIG_LIBYUV} -CONFIG_LOOPFILTERING_ACROSS_TILES=${RTCD_CONFIG_LOOPFILTERING_ACROSS_TILES} -CONFIG_LOOP_RESTORATION=${RTCD_CONFIG_LOOP_RESTORATION} -CONFIG_LOWBITDEPTH=${RTCD_CONFIG_LOWBITDEPTH} -CONFIG_LV_MAP=${RTCD_CONFIG_LV_MAP} -CONFIG_MASKED_TX=${RTCD_CONFIG_MASKED_TX} -CONFIG_MOTION_VAR=${RTCD_CONFIG_MOTION_VAR} -CONFIG_MSVS=${RTCD_CONFIG_MSVS} -CONFIG_MULTITHREAD=${RTCD_CONFIG_MULTITHREAD} -CONFIG_MV_COMPRESS=${RTCD_CONFIG_MV_COMPRESS} -CONFIG_NCOBMC=${RTCD_CONFIG_NCOBMC} -CONFIG_NEW_QUANT=${RTCD_CONFIG_NEW_QUANT} -CONFIG_NEW_TOKENSET=${RTCD_CONFIG_NEW_TOKENSET} -CONFIG_ONTHEFLY_BITPACKING=${RTCD_CONFIG_ONTHEFLY_BITPACKING} -CONFIG_OS_SUPPORT=${RTCD_CONFIG_OS_SUPPORT} -CONFIG_PALETTE=${RTCD_CONFIG_PALETTE} -CONFIG_PALETTE_THROUGHPUT=${RTCD_CONFIG_PALETTE_THROUGHPUT} -CONFIG_PARALLEL_DEBLOCKING=${RTCD_CONFIG_PARALLEL_DEBLOCKING} -CONFIG_PIC=${RTCD_CONFIG_PIC} -CONFIG_POSTPROC=${RTCD_CONFIG_POSTPROC} -CONFIG_POSTPROC_VISUALIZER=${RTCD_CONFIG_POSTPROC_VISUALIZER} -CONFIG_PVQ=${RTCD_CONFIG_PVQ} -CONFIG_RAWBITS=${RTCD_CONFIG_RAWBITS} -CONFIG_RD_DEBUG=${RTCD_CONFIG_RD_DEBUG} -CONFIG_REALTIME_ONLY=${RTCD_CONFIG_REALTIME_ONLY} -CONFIG_RECT_TX=${RTCD_CONFIG_RECT_TX} -CONFIG_REFERENCE_BUFFER=${RTCD_CONFIG_REFERENCE_BUFFER} -CONFIG_REF_ADAPT=${RTCD_CONFIG_REF_ADAPT} -CONFIG_REF_MV=${RTCD_CONFIG_REF_MV} -CONFIG_RUNTIME_CPU_DETECT=${RTCD_CONFIG_RUNTIME_CPU_DETECT} -CONFIG_RVCT=${RTCD_CONFIG_RVCT} -CONFIG_SHARED=${RTCD_CONFIG_SHARED} -CONFIG_SIZE_LIMIT=${RTCD_CONFIG_SIZE_LIMIT} -CONFIG_SMALL=${RTCD_CONFIG_SMALL} -CONFIG_SPATIAL_RESAMPLING=${RTCD_CONFIG_SPATIAL_RESAMPLING} -CONFIG_STATIC=${RTCD_CONFIG_STATIC} -CONFIG_STATIC_MSVCRT=${RTCD_CONFIG_STATIC_MSVCRT} -CONFIG_SUB8X8_MC=${RTCD_CONFIG_SUB8X8_MC} -CONFIG_SUPERTX=${RTCD_CONFIG_SUPERTX} -CONFIG_TEMPMV_SIGNALING=${RTCD_CONFIG_TEMPMV_SIGNALING} -CONFIG_TILE_GROUPS=${RTCD_CONFIG_TILE_GROUPS} -CONFIG_TPL_MV=${RTCD_CONFIG_TPL_MV} -CONFIG_TRIPRED=${RTCD_CONFIG_TRIPRED} -CONFIG_TX64X64=${RTCD_CONFIG_TX64X64} -CONFIG_UNIT_TESTS=${RTCD_CONFIG_UNIT_TESTS} -CONFIG_UNPOISON_PARTITION_CTX=${RTCD_CONFIG_UNPOISON_PARTITION_CTX} -CONFIG_VAR_TX=${RTCD_CONFIG_VAR_TX} -CONFIG_WARPED_MOTION=${RTCD_CONFIG_WARPED_MOTION} -CONFIG_WEBM_IO=${RTCD_CONFIG_WEBM_IO} -CONFIG_XIPHRC=${RTCD_CONFIG_XIPHRC} diff --git a/third_party/aom/build/cmake/toolchains/armv7-ios.cmake b/third_party/aom/build/cmake/toolchains/armv7-ios.cmake index bcd37a06d..71ac4067c 100644 --- a/third_party/aom/build/cmake/toolchains/armv7-ios.cmake +++ b/third_party/aom/build/cmake/toolchains/armv7-ios.cmake @@ -27,8 +27,4 @@ set(AOM_NEON_INTRIN_FLAG "") # No runtime cpu detect for armv7s-ios. set(CONFIG_RUNTIME_CPU_DETECT 0 CACHE BOOL "") -# RTCD generation requires --disable-media for armv7s-ios. -set(AOM_RTCD_FLAGS ${AOM_RTCD_FLAGS} --disable-media) -string(STRIP AOM_RTCD_FLAGS ${AOM_RTCD_FLAGS}) - endif () # AOM_BUILD_CMAKE_TOOLCHAINS_ARMV7_IOS_CMAKE_ diff --git a/third_party/aom/build/cmake/toolchains/armv7s-ios.cmake b/third_party/aom/build/cmake/toolchains/armv7s-ios.cmake index 08a0a37ee..99e1dc39c 100644 --- a/third_party/aom/build/cmake/toolchains/armv7s-ios.cmake +++ b/third_party/aom/build/cmake/toolchains/armv7s-ios.cmake @@ -27,8 +27,4 @@ set(AOM_NEON_INTRIN_FLAG "") # No runtime cpu detect for armv7s-ios. set(CONFIG_RUNTIME_CPU_DETECT 0 CACHE BOOL "") -# RTCD generation requires --disable-media for armv7s-ios. -set(AOM_RTCD_FLAGS ${AOM_RTCD_FLAGS} --disable-media) -string(STRIP AOM_RTCD_FLAGS ${AOM_RTCD_FLAGS}) - endif () # AOM_BUILD_CMAKE_TOOLCHAINS_ARMV7S_IOS_CMAKE_ |