diff options
Diffstat (limited to 'third_party/aom/build/cmake')
17 files changed, 483 insertions, 170 deletions
diff --git a/third_party/aom/build/cmake/aom_config_defaults.cmake b/third_party/aom/build/cmake/aom_config_defaults.cmake index cd6b5ab48..abdae1d66 100644 --- a/third_party/aom/build/cmake/aom_config_defaults.cmake +++ b/third_party/aom/build/cmake/aom_config_defaults.cmake @@ -15,150 +15,163 @@ # Values here are used only if not set by the user. set(RESTRICT "" CACHE STRING "Sets RESTRICT value for current target.") set(INLINE "" CACHE STRING "Sets INLINE value for current target.") -set(ARCH_ARM 0 CACHE BOOL "Enables ARM architecture.") -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_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.") -set(HAVE_DSPR2 0 CACHE BOOL "Enables DSPR2 optimizations.") -set(HAVE_MSA 0 CACHE BOOL "Enables MSA optimizations.") -set(HAVE_MIPS64 0 CACHE BOOL "Enables MIPS64 optimizations. ") -set(HAVE_MMX 0 CACHE BOOL "Enables MMX optimizations. ") -set(HAVE_SSE 0 CACHE BOOL "Enables SSE optimizations.") -set(HAVE_SSE2 0 CACHE BOOL "Enables SSE2 optimizations.") -set(HAVE_SSE3 0 CACHE BOOL "Enables SSE3 optimizations.") -set(HAVE_SSSE3 0 CACHE BOOL "Enables SSSE3 optimizations.") -set(HAVE_SSE4_1 0 CACHE BOOL "Enables SSE 4.1 optimizations.") -set(HAVE_AVX 0 CACHE BOOL "Enables AVX optimizations.") -set(HAVE_AVX2 0 CACHE BOOL "Enables AVX2 optimizations.") -set(HAVE_AOM_PORTS 0 CACHE BOOL "Internal flag, deprecated.") -set(HAVE_FEXCEPT 0 CACHE BOOL "Internal flag, GNU fenv.h present for target.") -set(HAVE_PTHREAD_H 0 CACHE BOOL "Internal flag, target pthread support.") -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_BINS 0 CACHE BOOL "Internal flag.") -set(CONFIG_INSTALL_LIBS 0 CACHE BOOL "Internal flag.") -set(CONFIG_INSTALL_SRCS 0 CACHE BOOL "Internal flag.") -set(CONFIG_DEBUG 0 CACHE BOOL "Internal flag.") -set(CONFIG_GPROF 0 CACHE BOOL "Internal flag.") -set(CONFIG_GCOV 0 CACHE BOOL "Internal flag.") -set(CONFIG_RVCT 0 CACHE BOOL "Internal flag.") -set(CONFIG_GCC 0 CACHE BOOL "Internal flag.") -set(CONFIG_MSVS 0 CACHE BOOL "Internal flag.") -set(CONFIG_PIC 0 CACHE BOOL "Internal flag.") -set(CONFIG_BIG_ENDIAN 0 CACHE BOOL "Internal flag.") -set(CONFIG_CODEC_SRCS 0 CACHE BOOL "Internal flag.") -set(CONFIG_DEBUG_LIBS 0 CACHE BOOL "Internal flag.") -set(CONFIG_RUNTIME_CPU_DETECT 1 CACHE BOOL "Internal flag.") -set(CONFIG_POSTPROC 1 CACHE BOOL "Internal flag.") -set(CONFIG_MULTITHREAD 1 CACHE BOOL "Internal flag.") -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_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.") -set(CONFIG_ONTHEFLY_BITPACKING 0 CACHE BOOL "Internal flag.") -set(CONFIG_ERROR_CONCEALMENT 0 CACHE BOOL "Internal flag.") -set(CONFIG_SHARED 0 CACHE BOOL "Internal flag.") -set(CONFIG_STATIC 1 CACHE BOOL "Internal flag.") -set(CONFIG_SMALL 0 CACHE BOOL "Internal flag.") -set(CONFIG_POSTPROC_VISUALIZER 0 CACHE BOOL "Internal flag.") -set(CONFIG_OS_SUPPORT 0 CACHE BOOL "Internal flag.") -set(CONFIG_UNIT_TESTS 1 CACHE BOOL "Internal flag.") -set(CONFIG_WEBM_IO 1 CACHE BOOL "Enables WebM support.") -set(CONFIG_LIBYUV 1 CACHE BOOL "Enables libyuv scaling and conversion support.") -set(CONFIG_ACCOUNTING 0 CACHE BOOL "Enables bit accounting.") -set(CONFIG_INSPECTION 0 CACHE BOOL "Enables bitstream inspection.") -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 1 CACHE BOOL "Internal flag.") -set(CONFIG_EXPERIMENTAL 0 CACHE BOOL "Internal flag.") -set(CONFIG_SIZE_LIMIT 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 1 CACHE BOOL "Internal flag.") -set(CONFIG_RECT_TX 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 1 CACHE BOOL "Internal flag.") -set(CONFIG_DPCM_INTRA 0 CACHE BOOL "Internal flag.") -set(CONFIG_TX64X64 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 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_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 1 CACHE BOOL "Internal flag.") -set(CONFIG_NCOBMC 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_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_RAWBITS 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 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 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 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.") -set(CONFIG_ENTROPY_STATS 0 CACHE BOOL "Internal flag.") -set(CONFIG_MASKED_TX 0 CACHE BOOL "Internal flag.") -set(CONFIG_DEPENDENT_HORZTILES 0 CACHE BOOL "Internal flag.") -set(CONFIG_DAALA_DIST 0 CACHE BOOL "Internal flag.") -set(CONFIG_TRIPRED 0 CACHE BOOL "Internal flag.") -set(CONFIG_PALETTE_THROUGHPUT 1 CACHE BOOL "Internal flag.") -set(CONFIG_REF_ADAPT 0 CACHE BOOL "Internal flag.") -set(CONFIG_LV_MAP 0 CACHE BOOL "Internal flag.") -set(CONFIG_TXK_SEL 0 CACHE BOOL "Internal flag.") -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.") +set(ARCH_ARM 0 CACHE NUMBER "Enables ARM architecture.") +set(ARCH_MIPS 0 CACHE NUMBER "Enables MIPS architecture.") +set(ARCH_X86 0 CACHE NUMBER "Enables X86 architecture.") +set(ARCH_X86_64 0 CACHE NUMBER "Enables X86_64 architecture.") +set(HAVE_EDSP 0 CACHE NUMBER "Enables EDSP optimizations.") +set(HAVE_NEON 0 CACHE NUMBER "Enables NEON intrinsics optimizations.") +set(HAVE_NEON_ASM 0 CACHE NUMBER "Enables NEON assembly optimizations.") +set(HAVE_MIPS32 0 CACHE NUMBER "Enables MIPS32 optimizations.") +set(HAVE_DSPR2 0 CACHE NUMBER "Enables DSPR2 optimizations.") +set(HAVE_MSA 0 CACHE NUMBER "Enables MSA optimizations.") +set(HAVE_MIPS64 0 CACHE NUMBER "Enables MIPS64 optimizations. ") +set(HAVE_MMX 0 CACHE NUMBER "Enables MMX optimizations. ") +set(HAVE_SSE 0 CACHE NUMBER "Enables SSE optimizations.") +set(HAVE_SSE2 0 CACHE NUMBER "Enables SSE2 optimizations.") +set(HAVE_SSE3 0 CACHE NUMBER "Enables SSE3 optimizations.") +set(HAVE_SSSE3 0 CACHE NUMBER "Enables SSSE3 optimizations.") +set(HAVE_SSE4_1 0 CACHE NUMBER "Enables SSE 4.1 optimizations.") +set(HAVE_AVX 0 CACHE NUMBER "Enables AVX optimizations.") +set(HAVE_AVX2 0 CACHE NUMBER "Enables AVX2 optimizations.") +set(HAVE_AOM_PORTS 0 CACHE NUMBER "Internal flag, deprecated.") +set(HAVE_FEXCEPT 0 CACHE NUMBER "Internal flag, GNU fenv.h present for target.") +set(HAVE_PTHREAD_H 0 CACHE NUMBER "Internal flag, target pthread support.") +set(HAVE_UNISTD_H 0 CACHE NUMBER "Internal flag, unistd.h present for target.") +set(HAVE_WXWIDGETS 0 CACHE NUMBER "WxWidgets present.") +set(CONFIG_DEPENDENCY_TRACKING 1 CACHE NUMBER "Internal flag.") +set(CONFIG_EXTERNAL_BUILD 0 CACHE NUMBER "Internal flag.") +set(CONFIG_INSTALL_BINS 0 CACHE NUMBER "Internal flag.") +set(CONFIG_INSTALL_LIBS 0 CACHE NUMBER "Internal flag.") +set(CONFIG_INSTALL_SRCS 0 CACHE NUMBER "Internal flag.") +set(CONFIG_DEBUG 0 CACHE NUMBER "Internal flag.") +set(CONFIG_GPROF 0 CACHE NUMBER "Internal flag.") +set(CONFIG_GCOV 0 CACHE NUMBER "Internal flag.") +set(CONFIG_RVCT 0 CACHE NUMBER "Internal flag.") +set(CONFIG_GCC 0 CACHE NUMBER "Internal flag.") +set(CONFIG_MSVS 0 CACHE NUMBER "Internal flag.") +set(CONFIG_PIC 0 CACHE NUMBER "Internal flag.") +set(CONFIG_BIG_ENDIAN 0 CACHE NUMBER "Internal flag.") +set(CONFIG_CODEC_SRCS 0 CACHE NUMBER "Internal flag.") +set(CONFIG_DEBUG_LIBS 0 CACHE NUMBER "Internal flag.") +set(CONFIG_RUNTIME_CPU_DETECT 1 CACHE NUMBER "Internal flag.") +set(CONFIG_POSTPROC 1 CACHE NUMBER "Internal flag.") +set(CONFIG_MULTITHREAD 1 CACHE NUMBER "Internal flag.") +set(CONFIG_INTERNAL_STATS 0 CACHE NUMBER "Internal flag.") +set(CONFIG_AV1_ENCODER 1 CACHE NUMBER "Enable AV1 encoder.") +set(CONFIG_AV1_DECODER 1 CACHE NUMBER "Enable AV1 decoder.") +set(CONFIG_AV1 1 CACHE NUMBER "Internal flag.") +set(CONFIG_STATIC_MSVCRT 0 CACHE NUMBER "Internal flag.") +set(CONFIG_SPATIAL_RESAMPLING 1 CACHE NUMBER "Internal flag.") +set(CONFIG_REALTIME_ONLY 0 CACHE NUMBER "Internal flag.") +set(CONFIG_ONTHEFLY_BITPACKING 0 CACHE NUMBER "Internal flag.") +set(CONFIG_ERROR_CONCEALMENT 0 CACHE NUMBER "Internal flag.") +set(CONFIG_SHARED 0 CACHE NUMBER "Internal flag.") +set(CONFIG_STATIC 1 CACHE NUMBER "Internal flag.") +set(CONFIG_SMALL 0 CACHE NUMBER "Internal flag.") +set(CONFIG_POSTPROC_VISUALIZER 0 CACHE NUMBER "Internal flag.") +set(CONFIG_OS_SUPPORT 0 CACHE NUMBER "Internal flag.") +set(CONFIG_UNIT_TESTS 1 CACHE NUMBER "Internal flag.") +set(CONFIG_WEBM_IO 1 CACHE NUMBER "Enables WebM support.") +set(CONFIG_LIBYUV 1 CACHE NUMBER "Enables libyuv scaling and conversion support.") +set(CONFIG_ACCOUNTING 0 CACHE NUMBER "Enables bit accounting.") +set(CONFIG_INSPECTION 0 CACHE NUMBER "Enables bitstream inspection.") +set(CONFIG_DECODE_PERF_TESTS 0 CACHE NUMBER "Internal flag.") +set(CONFIG_ENCODE_PERF_TESTS 0 CACHE NUMBER "Internal flag.") +set(CONFIG_COEFFICIENT_RANGE_CHECKING 0 CACHE NUMBER "Internal flag.") +set(CONFIG_LOWBITDEPTH 1 CACHE NUMBER "Internal flag.") +set(CONFIG_HIGHBITDEPTH 1 CACHE NUMBER "Internal flag.") +set(CONFIG_EXPERIMENTAL 0 CACHE NUMBER "Internal flag.") +set(CONFIG_SIZE_LIMIT 0 CACHE NUMBER "Internal flag.") +set(CONFIG_COLORSPACE_HEADERS 0 CACHE NUMBER "Internal flag.") +set(CONFIG_FP_MB_STATS 0 CACHE NUMBER "Internal flag.") +set(CONFIG_CDEF 1 CACHE NUMBER "Internal flag.") +set(CONFIG_VAR_TX 1 CACHE NUMBER "Internal flag.") +set(CONFIG_RECT_TX 1 CACHE NUMBER "Internal flag.") +set(CONFIG_RECT_TX_EXT 0 CACHE NUMBER "Internal flag.") +set(CONFIG_TPL_MV 0 CACHE NUMBER "Internal flag.") +set(CONFIG_DUAL_FILTER 1 CACHE NUMBER "Internal flag.") +set(CONFIG_CONVOLVE_ROUND 0 CACHE NUMBER "Internal flag.") +set(CONFIG_COMPOUND_ROUND 0 CACHE NUMBER "Internal flag.") +set(CONFIG_EXT_TX 1 CACHE NUMBER "Internal flag.") +set(CONFIG_DPCM_INTRA 0 CACHE NUMBER "Internal flag.") +set(CONFIG_TX64X64 0 CACHE NUMBER "Internal flag.") +set(CONFIG_EXT_INTRA 1 CACHE NUMBER "Internal flag.") +set(CONFIG_INTRA_INTERP 0 CACHE NUMBER "Internal flag.") +set(CONFIG_FILTER_INTRA 0 CACHE NUMBER "Internal flag.") +set(CONFIG_INTRA_EDGE 0 CACHE NUMBER "Internal flag.") +set(CONFIG_INTRABC 0 CACHE NUMBER "Internal flag.") +set(CONFIG_EXT_INTER 1 CACHE NUMBER "Internal flag.") +set(CONFIG_INTERINTRA 1 CACHE NUMBER "Internal flag.") +set(CONFIG_WEDGE 1 CACHE NUMBER "Internal flag.") +set(CONFIG_COMPOUND_SEGMENT 1 CACHE NUMBER "Internal flag.") +set(CONFIG_EXT_REFS 1 CACHE NUMBER "Internal flag.") +set(CONFIG_SPEED_REFS 0 CACHE NUMBER "Internal flag.") +set(CONFIG_GLOBAL_MOTION 1 CACHE NUMBER "Internal flag.") +set(CONFIG_NEW_QUANT 0 CACHE NUMBER "Internal flag.") +set(CONFIG_SUPERTX 0 CACHE NUMBER "Internal flag.") +set(CONFIG_ANS 0 CACHE NUMBER "Internal flag.") +set(CONFIG_LOOP_RESTORATION 0 CACHE NUMBER "Internal flag.") +set(CONFIG_EXT_PARTITION 0 CACHE NUMBER "Internal flag.") +set(CONFIG_EXT_PARTITION_TYPES 0 CACHE NUMBER "Internal flag.") +set(CONFIG_UNPOISON_PARTITION_CTX 0 CACHE NUMBER "Internal flag.") +set(CONFIG_EXT_TILE 0 CACHE NUMBER "Internal flag.") +set(CONFIG_MOTION_VAR 1 CACHE NUMBER "Internal flag.") +set(CONFIG_NCOBMC 0 CACHE NUMBER "Internal flag.") +set(CONFIG_WARPED_MOTION 1 CACHE NUMBER "Internal flag.") +set(CONFIG_Q_ADAPT_PROBS 0 CACHE NUMBER "Internal flag.") +set(CONFIG_BITSTREAM_DEBUG 0 CACHE NUMBER "Internal flag.") +set(CONFIG_ALT_INTRA 1 CACHE NUMBER "Internal flag.") +set(CONFIG_PALETTE 1 CACHE NUMBER "Internal flag.") +set(CONFIG_PALETTE_DELTA_ENCODING 0 CACHE NUMBER "Internal flag.") +set(CONFIG_RAWBITS 0 CACHE NUMBER "Internal flag.") +set(CONFIG_EC_SMALLMUL 1 CACHE NUMBER "Internal flag.") +set(CONFIG_PVQ 0 CACHE NUMBER "Internal flag.") +set(CONFIG_CFL 0 CACHE NUMBER "Internal flag.") +set(CONFIG_XIPHRC 0 CACHE NUMBER "Internal flag.") +set(CONFIG_CB4X4 1 CACHE NUMBER "Internal flag.") +set(CONFIG_CHROMA_2X2 0 CACHE NUMBER "Internal flag.") +set(CONFIG_CHROMA_SUB8X8 1 CACHE NUMBER "Internal flag.") +set(CONFIG_FRAME_SIZE 0 CACHE NUMBER "Internal flag.") +set(CONFIG_DELTA_Q 1 CACHE NUMBER "Internal flag.") +set(CONFIG_EXT_DELTA_Q 1 CACHE NUMBER "Internal flag.") +set(CONFIG_ADAPT_SCAN 0 CACHE NUMBER "Internal flag.") +set(CONFIG_FILTER_7BIT 1 CACHE NUMBER "Internal flag.") +set(CONFIG_PARALLEL_DEBLOCKING 1 CACHE NUMBER "Internal flag.") +set(CONFIG_LOOPFILTERING_ACROSS_TILES 1 CACHE NUMBER "Internal flag.") +set(CONFIG_TEMPMV_SIGNALING 1 CACHE NUMBER "Internal flag.") +set(CONFIG_RD_DEBUG 0 CACHE NUMBER "Internal flag.") +set(CONFIG_REFERENCE_BUFFER 1 CACHE NUMBER "Internal flag.") +set(CONFIG_COEF_INTERLEAVE 0 CACHE NUMBER "Internal flag.") +set(CONFIG_ENTROPY_STATS 0 CACHE NUMBER "Internal flag.") +set(CONFIG_MASKED_TX 0 CACHE NUMBER "Internal flag.") +set(CONFIG_DEPENDENT_HORZTILES 0 CACHE NUMBER "Internal flag.") +set(CONFIG_DAALA_DIST 0 CACHE NUMBER "Internal flag.") +set(CONFIG_TRIPRED 0 CACHE NUMBER "Internal flag.") +set(CONFIG_PALETTE_THROUGHPUT 1 CACHE NUMBER "Internal flag.") +set(CONFIG_REF_ADAPT 0 CACHE NUMBER "Internal flag.") +set(CONFIG_LV_MAP 0 CACHE NUMBER "Internal flag.") +set(CONFIG_TXK_SEL 0 CACHE NUMBER "Internal flag.") +set(CONFIG_MV_COMPRESS 1 CACHE NUMBER "Internal flag.") +set(CONFIG_FRAME_SUPERRES 0 CACHE NUMBER "Internal flag.") +set(CONFIG_NEW_MULTISYMBOL 0 CACHE NUMBER "Internal flag.") +set(CONFIG_COMPOUND_SINGLEREF 0 CACHE NUMBER "Internal flag.") +set(CONFIG_AOM_QM 0 CACHE NUMBER "Internal flag.") +set(CONFIG_ONE_SIDED_COMPOUND 1 CACHE NUMBER "Internal flag.") +set(CONFIG_EXT_COMP_REFS 0 CACHE NUMBER "Internal flag.") +set(CONFIG_SMOOTH_HV 1 CACHE NUMBER "Internal flag.") +set(CONFIG_VAR_REFS 0 CACHE NUMBER "Internal flag.") +set(CONFIG_RECT_INTRA_PRED 0 CACHE NUMBER "Internal flag.") +set(CONFIG_LGT 0 CACHE NUMBER "Internal flag.") +set(CONFIG_SBL_SYMBOL 0 CACHE NUMBER "Internal flag.") +set(CONFIG_NCOBMC_ADAPT_WEIGHT 0 CACHE NUMBER "Internal flag.") +set(CONFIG_BGSPRITE 0 CACHE NUMBER "Internal flag.") +set(CONFIG_VAR_TX_NO_TX_MODE 0 CACHE NUMBER "Internal flag.") +set(CONFIG_ANALYZER 0 CACHE NUMBER "Internal flag.") +set(CONFIG_DCT_ONLY 0 CACHE NUMBER "Internal flag.") +set(CONFIG_DAALA_DCT4 0 CACHE NUMBER "Internal flag.") +set(CONFIG_DAALA_DCT8 0 CACHE NUMBER "Internal flag.") +set(CONFIG_GF_GROUPS 0 CACHE NUMBER "Internal flag.") +set(CONFIG_MRC_TX 0 CACHE NUMBER "Internal flag.") +set(CONFIG_INTER_STATS_ONLY 0 CACHE NUMBER "Internal flag.") +set(CONFIG_DIST_8X8 0 CACHE NUMBER "Internal flag.") diff --git a/third_party/aom/build/cmake/aom_configure.cmake b/third_party/aom/build/cmake/aom_configure.cmake index 0fa2cce0e..1c373e589 100644 --- a/third_party/aom/build/cmake/aom_configure.cmake +++ b/third_party/aom/build/cmake/aom_configure.cmake @@ -83,6 +83,19 @@ string(STRIP "${AOM_CMAKE_CONFIG}" AOM_CMAKE_CONFIG) message("--- aom_configure: Detected CPU: ${AOM_TARGET_CPU}") set(AOM_TARGET_SYSTEM ${CMAKE_SYSTEM_NAME}) +if (BUILD_SHARED_LIBS) + set(CONFIG_PIC 1) + set(CONFIG_SHARED 1) + set(CMAKE_POSITION_INDEPENDENT_CODE ON) + + if ("${AOM_TARGET_SYSTEM}" STREQUAL "Linux" AND + "${AOM_TARGET_CPU}" MATCHES "^armv7") + set(AOM_AS_FLAGS ${AOM_AS_FLAGS} --defsym PIC=1) + else () + set(AOM_AS_FLAGS ${AOM_AS_FLAGS} -DPIC) + endif () +endif () + if (NOT "${AOM_SUPPORTED_CPU_TARGETS}" MATCHES "${AOM_TARGET_CPU}") message(FATAL_ERROR "No RTCD support for ${AOM_TARGET_CPU}. Create it, or " "add -DAOM_TARGET_CPU=generic to your cmake command line for a " @@ -90,10 +103,9 @@ if (NOT "${AOM_SUPPORTED_CPU_TARGETS}" MATCHES "${AOM_TARGET_CPU}") 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. if (ENABLE_NASM) find_program(AS_EXECUTABLE nasm $ENV{NASM_PATH}) + test_nasm() set(AOM_AS_FLAGS ${AOM_AS_FLAGS} -Ox) else () find_program(AS_EXECUTABLE yasm $ENV{YASM_PATH}) @@ -165,6 +177,7 @@ else () add_compiler_flag_if_supported("-Wimplicit-function-declaration") add_compiler_flag_if_supported("-Wpointer-arith") add_compiler_flag_if_supported("-Wsign-compare") + add_compiler_flag_if_supported("-Wstring-conversion") add_compiler_flag_if_supported("-Wtype-limits") add_compiler_flag_if_supported("-Wuninitialized") add_compiler_flag_if_supported("-Wunused") @@ -224,6 +237,48 @@ if (CONFIG_ANALYZER) endif () endif () +if (CONFIG_VAR_TX_NO_TX_MODE AND NOT CONFIG_VAR_TX) + message(WARNING + "--- CONFIG_VAR_TX_NO_TX_MODE requires CONFIG_VAR_TX, disabling.") + set(CONFIG_VAR_TX_NO_TX_MODE 0) +endif() + +if (CONFIG_DAALA_DCT4) + if (NOT CONFIG_DCT_ONLY) + message(WARNING + "--- Enabled CONFIG_DCT_ONLY, needed for CONFIG_DAALA_DCT4.") + set(CONFIG_DCT_ONLY 1) + endif() +endif() + +if (CONFIG_DAALA_DCT4 OR CONFIG_DAALA_DCT8) + if (HAVE_MMX) + message(WARNING + "--- Disabled HAVE_MMX, incompatible with CONFIG_DAALA_DCTx.") + set(HAVE_MMX 0) + endif() + if (CONFIG_RECT_TX) + message(WARNING + "--- Disabled CONFIG_RECT_TX, incompatible with CONFIG_DAALA_DCTx.") + set(CONFIG_RECT_TX 0) + endif() + if (CONFIG_VAR_TX) + message(WARNING + "--- Disabled CONFIG_VAR_TX, incompatible with CONFIG_DAALA_DCTx.") + set(CONFIG_VAR_TX 0) + endif() + if (CONFIG_LGT) + message(WARNING + "--- Disabled CONFIG_LGT, incompatible with CONFIG_DAALA_DCTx.") + set(CONFIG_LGT 0) + endif() + if (NOT CONFIG_LOWBITDEPTH) + message(WARNING + "--- Enabled CONFIG_LOWBITDEPTH, needed for CONFIG_DAALA_DCTx.") + set(CONFIG_LOWBITDEPTH 1) + endif() +endif() + if (NOT MSVC) aom_push_var(CMAKE_REQUIRED_LIBRARIES "m") aom_check_c_compiles("fenv_check" diff --git a/third_party/aom/build/cmake/aom_optimization.cmake b/third_party/aom/build/cmake/aom_optimization.cmake index 5a3865281..456798ceb 100644 --- a/third_party/aom/build/cmake/aom_optimization.cmake +++ b/third_party/aom/build/cmake/aom_optimization.cmake @@ -11,6 +11,8 @@ if (NOT AOM_BUILD_CMAKE_AOM_OPTIMIZATION_CMAKE_) set(AOM_BUILD_CMAKE_AOM_OPTIMIZATION_CMAKE_ 1) +include("${AOM_ROOT}/build/cmake/util.cmake") + # Translate $flag to one which MSVC understands, and write the new flag to the # variable named by $translated_flag (or unset it, when MSVC needs no flag). function (get_msvc_intrinsic_flag flag translated_flag) @@ -33,7 +35,8 @@ endfunction () # Note: the libaom target is always updated because OBJECT libraries have rules # that disallow the direct addition of .o files to them as dependencies. Static # libraries do not have this limitation. -function (add_intrinsics_object_library flag opt_name target_to_update sources) +function (add_intrinsics_object_library flag opt_name target_to_update sources + dependent_target) set(target_name ${target_to_update}_${opt_name}_intrinsics) add_library(${target_name} OBJECT ${${sources}}) @@ -45,7 +48,7 @@ function (add_intrinsics_object_library flag opt_name target_to_update sources) target_compile_options(${target_name} PUBLIC ${flag}) endif () - target_sources(aom PUBLIC $<TARGET_OBJECTS:${target_name}>) + target_sources(${dependent_target} PRIVATE $<TARGET_OBJECTS:${target_name}>) # Add the new lib target to the global list of aom library targets. list(APPEND AOM_LIB_TARGETS ${target_name}) @@ -55,7 +58,7 @@ endfunction () # Adds sources in list named by $sources to $target and adds $flag to the # compile flags for each source file. function (add_intrinsics_source_to_target flag target sources) - target_sources(${target} PUBLIC ${${sources}}) + target_sources(${target} PRIVATE ${${sources}}) if (MSVC) get_msvc_intrinsic_flag(${flag} "flag") endif () @@ -128,7 +131,7 @@ function (add_asm_library lib_name asm_sources dependent_target) COMMENT "Building ASM object ${asm_object}" WORKING_DIRECTORY "${AOM_CONFIG_DIR}" VERBATIM) - target_sources(${lib_name} PRIVATE "${asm_object}") + target_sources(aom PRIVATE "${asm_object}") endforeach () # The above created a target containing only ASM sources. Cmake needs help @@ -136,14 +139,7 @@ function (add_asm_library lib_name asm_sources dependent_target) # linker language to C. We don't bother with setting the LINKER_LANGUAGE # property on the library target because not all generators obey it (looking # at you, xcode generator). - set(dummy_c_file "${AOM_CONFIG_DIR}/${lib_name}_dummy.c") - file(WRITE "${dummy_c_file}" - "// Generated file. DO NOT EDIT!\n" - "// ${lib_name} needs C file to force link language, ignore me.\n" - "void ${lib_name}_dummy_function(void) {}\n") - target_sources(${lib_name} PUBLIC ${dummy_c_file}) - - target_link_libraries(${dependent_target} ${AOM_LIB_LINK_TYPE} ${lib_name}) + add_dummy_source_file_to_target("${lib_name}" "c") # Add the new lib target to the global list of aom library targets. list(APPEND AOM_LIB_TARGETS ${lib_name}) @@ -203,4 +199,43 @@ function (add_gas_asm_library lib_name asm_sources dependent_target) set(${asm_sources} ${${asm_sources}} PARENT_SCOPE) endfunction () +# Terminates generation if nasm found in PATH does not meet requirements. +# Currently checks only for presence of required object formats and support for +# the -Ox argument (multipass optimization). +function (test_nasm) + execute_process(COMMAND ${AS_EXECUTABLE} -hf + OUTPUT_VARIABLE nasm_helptext) + + if (NOT "${nasm_helptext}" MATCHES "-Ox") + message(FATAL_ERROR + "Unsupported nasm: multipass optimization not supported.") + endif () + + if ("${AOM_TARGET_CPU}" STREQUAL "x86") + if ("${AOM_TARGET_SYSTEM}" STREQUAL "Darwin") + if (NOT "${nasm_helptext}" MATCHES "macho32") + message(FATAL_ERROR + "Unsupported nasm: macho32 object format not supported.") + endif () + elseif ("${AOM_TARGET_SYSTEM}" STREQUAL "Linux") + if (NOT "${nasm_helptext}" MATCHES "elf32") + message(FATAL_ERROR + "Unsupported nasm: elf32 object format not supported.") + endif () + endif () + else () + if ("${AOM_TARGET_SYSTEM}" STREQUAL "Darwin") + if (NOT "${nasm_helptext}" MATCHES "macho64") + message(FATAL_ERROR + "Unsupported nasm: macho64 object format not supported.") + endif () + elseif ("${AOM_TARGET_SYSTEM}" STREQUAL "Linux") + if (NOT "${nasm_helptext}" MATCHES "elf64") + message(FATAL_ERROR + "Unsupported nasm: elf64 object format not supported.") + endif () + endif () + endif () +endfunction () + endif () # AOM_BUILD_CMAKE_AOM_OPTIMIZATION_CMAKE_ diff --git a/third_party/aom/build/cmake/compiler_flags.cmake b/third_party/aom/build/cmake/compiler_flags.cmake index c9fc69b92..ee6d12bd3 100644 --- a/third_party/aom/build/cmake/compiler_flags.cmake +++ b/third_party/aom/build/cmake/compiler_flags.cmake @@ -220,4 +220,25 @@ function (append_exe_linker_flag flag) endif () endfunction () +# Adds $flag to the link flags for $target. +function (append_link_flag_to_target target flags) + unset(target_link_flags) + get_target_property(target_link_flags ${target} LINK_FLAGS) + + if (target_link_flags) + unset(link_flag_found) + string(FIND "${target_link_flags}" "${flags}" link_flag_found) + + if (NOT ${link_flag_found} EQUAL -1) + return() + endif () + + set(target_link_flags "${target_link_flags} ${flags}") + else () + set(target_link_flags "${flags}") + endif () + + set_target_properties(${target} PROPERTIES LINK_FLAGS ${target_link_flags}) +endfunction () + endif () # AOM_BUILD_CMAKE_COMPILER_FLAGS_CMAKE_ diff --git a/third_party/aom/build/cmake/exports.cmake b/third_party/aom/build/cmake/exports.cmake new file mode 100644 index 000000000..8153aad98 --- /dev/null +++ b/third_party/aom/build/cmake/exports.cmake @@ -0,0 +1,65 @@ +## +## 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. +## +if (NOT AOM_BUILD_CMAKE_EXPORTS_CMAKE_) +set(AOM_BUILD_CMAKE_EXPORTS_CMAKE_ 1) + +include("${AOM_ROOT}/build/cmake/exports_sources.cmake") + +# Creates the custom target which handles generation of the symbol export lists. +function (setup_exports_target) + if ("${AOM_TARGET_SYSTEM}" STREQUAL "Darwin") + set(symbol_file_ext "syms") + elseif ("${AOM_TARGET_SYSTEM}" MATCHES "Windows\|MSYS" AND MSVC) + set(symbol_file_ext "def") + else () + set(symbol_file_ext "ver") + endif () + + set(aom_sym_file "${AOM_CONFIG_DIR}/libaom.${symbol_file_ext}") + + add_custom_target(generate_exports + COMMAND ${CMAKE_COMMAND} + -DAOM_ROOT="${AOM_ROOT}" + -DAOM_CONFIG_DIR="${AOM_CONFIG_DIR}" + -DAOM_TARGET_SYSTEM=${AOM_TARGET_SYSTEM} + -DAOM_SYM_FILE="${aom_sym_file}" + -DAOM_MSVC=${MSVC} + -DAOM_XCODE=${XCODE} + -DCONFIG_NAME=$<CONFIG> + -DCONFIG_AV1_DECODER=${CONFIG_AV1_DECODER} + -DCONFIG_AV1_ENCODER=${CONFIG_AV1_ENCODER} + -P "${AOM_ROOT}/build/cmake/generate_exports.cmake" + SOURCES ${AOM_EXPORTS_SOURCES} + DEPENDS ${AOM_EXPORTS_SOURCES}) + + # Make libaom depend on the exports file, and set flags to pick it up when + # creating the dylib. + add_dependencies(aom generate_exports) + + if (APPLE) + set_property(TARGET aom APPEND_STRING PROPERTY LINK_FLAGS + "-exported_symbols_list ${aom_sym_file}") + elseif (WIN32) + message(FATAL_ERROR "Windows DLL builds not supported yet.") + if (NOT MSVC) + set_property(TARGET aom APPEND_STRING PROPERTY LINK_FLAGS + "-Wl,--version-script ${aom_sym_file}") + endif () + + # TODO(tomfinegan): Sort out the import lib situation and flags for MSVC. + + else () + set_property(TARGET aom APPEND_STRING PROPERTY LINK_FLAGS + "-Wl,--version-script,${aom_sym_file}") + endif () +endfunction () + +endif () # AOM_BUILD_CMAKE_EXPORTS_CMAKE_ diff --git a/third_party/aom/build/cmake/exports_sources.cmake b/third_party/aom/build/cmake/exports_sources.cmake new file mode 100644 index 000000000..36f79ee09 --- /dev/null +++ b/third_party/aom/build/cmake/exports_sources.cmake @@ -0,0 +1,30 @@ +## +## 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. +## +if (NOT AOM_BUILD_CMAKE_EXPORTS_SOURCES_CMAKE_) +set(AOM_BUILD_CMAKE_EXPORTS_SOURCES_CMAKE_ 1) + +set(AOM_EXPORTS_SOURCES "${AOM_ROOT}/aom/exports_com") + +if (CONFIG_AV1_DECODER) + set(AOM_EXPORTS_SOURCES + ${AOM_EXPORTS_SOURCES} + "${AOM_ROOT}/aom/exports_dec" + "${AOM_ROOT}/av1/exports_dec") +endif () + +if (CONFIG_AV1_ENCODER) + set(AOM_EXPORTS_SOURCES + ${AOM_EXPORTS_SOURCES} + "${AOM_ROOT}/aom/exports_enc" + "${AOM_ROOT}/av1/exports_enc") +endif () + +endif () # AOM_BUILD_CMAKE_EXPORTS_SOURCES_CMAKE_ diff --git a/third_party/aom/build/cmake/generate_exports.cmake b/third_party/aom/build/cmake/generate_exports.cmake new file mode 100644 index 000000000..baa29828b --- /dev/null +++ b/third_party/aom/build/cmake/generate_exports.cmake @@ -0,0 +1,64 @@ +## +## 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) + +set(REQUIRED_ARGS "AOM_ROOT" "AOM_CONFIG_DIR" "AOM_TARGET_SYSTEM" "AOM_SYM_FILE" + "CONFIG_AV1_DECODER" "CONFIG_AV1_ENCODER") + +foreach (arg ${REQUIRED_ARGS}) + if ("${${arg}}" STREQUAL "") + message(FATAL_ERROR "${arg} must not be empty.") + endif () +endforeach () + +include("${AOM_ROOT}/build/cmake/exports_sources.cmake") + +if ("${AOM_TARGET_SYSTEM}" STREQUAL "Darwin") + set(symbol_prefix "_") +elseif ("${AOM_TARGET_SYSTEM}" MATCHES "Windows\|MSYS" AND AOM_MSVC) + set(symbol_prefix "_") + file(WRITE "${AOM_SYM_FILE}" + "LIBRARY libaom INITINSTANCE TERMINSTANCE\n" + "DATA MULTIPLE NONSHARED\n" + "EXPORTS\n") +else () + set(symbol_suffix ";") +endif () + +set(aom_sym_file "${AOM_SYM_FILE}") + +if ("${AOM_TARGET_SYSTEM}" STREQUAL "Darwin") + file(REMOVE "${aom_sym_file}") +elseif ("${AOM_TARGET_SYSTEM}" MATCHES "Windows\|MSYS") + file(WRITE "${aom_sym_file}" + "LIBRARY libaom INITINSTANCE TERMINSTANCE\n" + "DATA MULTIPLE NONSHARED\n" + "EXPORTS\n") +else () + file(WRITE "${aom_sym_file}" "{ global:\n") +endif () + +foreach (export_file ${AOM_EXPORTS_SOURCES}) + file(STRINGS "${export_file}" exported_file_data) + set(exported_symbols "${exported_symbols} ${exported_file_data};") + string(STRIP "${exported_symbols}" exported_symbols) +endforeach () + +foreach (exported_symbol ${exported_symbols}) + string(STRIP "${exported_symbol}" exported_symbol) + string(REGEX REPLACE "text \|data " "" "exported_symbol" "${exported_symbol}") + set(exported_symbol "${symbol_prefix}${exported_symbol}${symbol_suffix}") + file(APPEND "${aom_sym_file}" "${exported_symbol}\n") +endforeach () + +if ("${aom_sym_file}" MATCHES "ver$") + file(APPEND "${aom_sym_file}" " };") +endif () diff --git a/third_party/aom/build/cmake/toolchains/arm-ios-common.cmake b/third_party/aom/build/cmake/toolchains/arm-ios-common.cmake index 8317ae272..8929f3b1d 100644 --- a/third_party/aom/build/cmake/toolchains/arm-ios-common.cmake +++ b/third_party/aom/build/cmake/toolchains/arm-ios-common.cmake @@ -24,7 +24,7 @@ set(AOM_ADS2GAS "${CMAKE_CURRENT_SOURCE_DIR}/build/make/ads2gas_apple.pl") set(AOM_GAS_EXT "S") # No runtime cpu detect for arm*-ios targets. -set(CONFIG_RUNTIME_CPU_DETECT 0 CACHE BOOL "") +set(CONFIG_RUNTIME_CPU_DETECT 0 CACHE NUMBER "") # TODO(tomfinegan): Handle bit code embedding. diff --git a/third_party/aom/build/cmake/toolchains/arm64-linux-gcc.cmake b/third_party/aom/build/cmake/toolchains/arm64-linux-gcc.cmake index b8efe6be6..303f1cf9a 100644 --- a/third_party/aom/build/cmake/toolchains/arm64-linux-gcc.cmake +++ b/third_party/aom/build/cmake/toolchains/arm64-linux-gcc.cmake @@ -30,6 +30,6 @@ set(CMAKE_SYSTEM_PROCESSOR "arm64") set(AOM_NEON_INTRIN_FLAG "") # No runtime cpu detect for arm64-linux-gcc. -set(CONFIG_RUNTIME_CPU_DETECT 0 CACHE BOOL "") +set(CONFIG_RUNTIME_CPU_DETECT 0 CACHE NUMBER "") endif () # AOM_BUILD_CMAKE_TOOLCHAINS_ARM64_LINUX_GCC_CMAKE_ diff --git a/third_party/aom/build/cmake/toolchains/armv7-ios.cmake b/third_party/aom/build/cmake/toolchains/armv7-ios.cmake index 71ac4067c..c1e72ce3d 100644 --- a/third_party/aom/build/cmake/toolchains/armv7-ios.cmake +++ b/third_party/aom/build/cmake/toolchains/armv7-ios.cmake @@ -25,6 +25,6 @@ include("${CMAKE_CURRENT_LIST_DIR}/arm-ios-common.cmake") set(AOM_NEON_INTRIN_FLAG "") # No runtime cpu detect for armv7s-ios. -set(CONFIG_RUNTIME_CPU_DETECT 0 CACHE BOOL "") +set(CONFIG_RUNTIME_CPU_DETECT 0 CACHE NUMBER "") endif () # AOM_BUILD_CMAKE_TOOLCHAINS_ARMV7_IOS_CMAKE_ diff --git a/third_party/aom/build/cmake/toolchains/armv7-linux-gcc.cmake b/third_party/aom/build/cmake/toolchains/armv7-linux-gcc.cmake index eedfda464..13a737784 100644 --- a/third_party/aom/build/cmake/toolchains/armv7-linux-gcc.cmake +++ b/third_party/aom/build/cmake/toolchains/armv7-linux-gcc.cmake @@ -43,6 +43,6 @@ set(AOM_ADS2GAS "${CMAKE_CURRENT_SOURCE_DIR}/build/make/ads2gas.pl") set(AOM_GAS_EXT "S") # No runtime cpu detect for armv7-linux-gcc. -set(CONFIG_RUNTIME_CPU_DETECT 0 CACHE BOOL "") +set(CONFIG_RUNTIME_CPU_DETECT 0 CACHE NUMBER "") endif () # AOM_BUILD_CMAKE_TOOLCHAINS_ARMV7_LINUX_GCC_CMAKE_ diff --git a/third_party/aom/build/cmake/toolchains/armv7s-ios.cmake b/third_party/aom/build/cmake/toolchains/armv7s-ios.cmake index 99e1dc39c..bdb627c78 100644 --- a/third_party/aom/build/cmake/toolchains/armv7s-ios.cmake +++ b/third_party/aom/build/cmake/toolchains/armv7s-ios.cmake @@ -25,6 +25,6 @@ include("${CMAKE_CURRENT_LIST_DIR}/arm-ios-common.cmake") set(AOM_NEON_INTRIN_FLAG "") # No runtime cpu detect for armv7s-ios. -set(CONFIG_RUNTIME_CPU_DETECT 0 CACHE BOOL "") +set(CONFIG_RUNTIME_CPU_DETECT 0 CACHE NUMBER "") endif () # AOM_BUILD_CMAKE_TOOLCHAINS_ARMV7S_IOS_CMAKE_ diff --git a/third_party/aom/build/cmake/toolchains/mips32-linux-gcc.cmake b/third_party/aom/build/cmake/toolchains/mips32-linux-gcc.cmake index a55c41115..11406bd08 100644 --- a/third_party/aom/build/cmake/toolchains/mips32-linux-gcc.cmake +++ b/third_party/aom/build/cmake/toolchains/mips32-linux-gcc.cmake @@ -66,6 +66,6 @@ set(CMAKE_CXX_COMPILER_ARG1 "-EL ${MIPS_CXXFLAGS}") set(CMAKE_SYSTEM_PROCESSOR "mips32") # No runtime cpu detect for mips32-linux-gcc. -set(CONFIG_RUNTIME_CPU_DETECT 0 CACHE BOOL "") +set(CONFIG_RUNTIME_CPU_DETECT 0 CACHE NUMBER "") endif () # AOM_BUILD_CMAKE_TOOLCHAINS_MIPS32_LINUX_GCC_CMAKE_ diff --git a/third_party/aom/build/cmake/toolchains/mips64-linux-gcc.cmake b/third_party/aom/build/cmake/toolchains/mips64-linux-gcc.cmake index 28b1582cc..fffb495bf 100644 --- a/third_party/aom/build/cmake/toolchains/mips64-linux-gcc.cmake +++ b/third_party/aom/build/cmake/toolchains/mips64-linux-gcc.cmake @@ -43,6 +43,6 @@ set(CMAKE_CXX_COMPILER_ARG1 "-EL ${MIPS_CXXFLAGS}") set(CMAKE_SYSTEM_PROCESSOR "mips64") # No runtime cpu detect for mips64-linux-gcc. -set(CONFIG_RUNTIME_CPU_DETECT 0 CACHE BOOL "") +set(CONFIG_RUNTIME_CPU_DETECT 0 CACHE NUMBER "") endif () # AOM_BUILD_CMAKE_TOOLCHAINS_MIPS64_LINUX_GCC_CMAKE_ diff --git a/third_party/aom/build/cmake/toolchains/x86-ios-simulator.cmake b/third_party/aom/build/cmake/toolchains/x86-ios-simulator.cmake index 4e4ebc034..295156c3d 100644 --- a/third_party/aom/build/cmake/toolchains/x86-ios-simulator.cmake +++ b/third_party/aom/build/cmake/toolchains/x86-ios-simulator.cmake @@ -20,7 +20,7 @@ set(CMAKE_SYSTEM_PROCESSOR "i386") set(CMAKE_OSX_ARCHITECTURES "i386") # Avoid noisy PIC/PIE warnings. -set(CONFIG_PIC 1 CACHE BOOL "") +set(CONFIG_PIC 1 CACHE NUMBER "") include("${CMAKE_CURRENT_LIST_DIR}/ios-simulator-common.cmake") diff --git a/third_party/aom/build/cmake/toolchains/x86-macos.cmake b/third_party/aom/build/cmake/toolchains/x86-macos.cmake index 22d0171a7..c9cab3d5b 100644 --- a/third_party/aom/build/cmake/toolchains/x86-macos.cmake +++ b/third_party/aom/build/cmake/toolchains/x86-macos.cmake @@ -15,4 +15,4 @@ set(CMAKE_C_COMPILER_ARG1 "-arch i386") set(CMAKE_CXX_COMPILER_ARG1 "-arch i386") # Apple tools always complain in 32 bit mode without PIC. -set(CONFIG_PIC 1 CACHE STRING "") +set(CONFIG_PIC 1 CACHE NUMBER "") diff --git a/third_party/aom/build/cmake/util.cmake b/third_party/aom/build/cmake/util.cmake new file mode 100644 index 000000000..62841a63b --- /dev/null +++ b/third_party/aom/build/cmake/util.cmake @@ -0,0 +1,30 @@ +## +## 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. +## +if (NOT AOM_BUILD_CMAKE_UTIL_CMAKE_) +set(AOM_BUILD_CMAKE_UTIL_CMAKE_ 1) + +function (create_dummy_source_file basename extension out_file_path) + set(dummy_source_file "${AOM_CONFIG_DIR}/${basename}.${extension}") + file(WRITE "${dummy_source_file}" + "// Generated file. DO NOT EDIT!\n" + "// ${target_name} needs a ${extension} file to force link language, \n" + "// or to silence a harmless CMake warning: Ignore me.\n" + "void ${target_name}_dummy_function(void) {}\n") + set(${out_file_path} ${dummy_source_file} PARENT_SCOPE) +endfunction () + +function (add_dummy_source_file_to_target target_name extension) + create_dummy_source_file("${target_name}" "${extension}" "dummy_source_file") + target_sources(${target_name} PRIVATE ${dummy_source_file}) +endfunction () + +endif() # AOM_BUILD_CMAKE_UTIL_CMAKE_ + |