summaryrefslogtreecommitdiffstats
path: root/third_party/aom/build/cmake/aom_optimization.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'third_party/aom/build/cmake/aom_optimization.cmake')
-rw-r--r--third_party/aom/build/cmake/aom_optimization.cmake23
1 files changed, 23 insertions, 0 deletions
diff --git a/third_party/aom/build/cmake/aom_optimization.cmake b/third_party/aom/build/cmake/aom_optimization.cmake
index 456798ceb..c58c3993e 100644
--- a/third_party/aom/build/cmake/aom_optimization.cmake
+++ b/third_party/aom/build/cmake/aom_optimization.cmake
@@ -238,4 +238,27 @@ function (test_nasm)
endif ()
endfunction ()
+# Adds build command for generation of rtcd C source files using
+# build/make/rtcd.pl. $config is the input perl file, $output is the output C
+# include file, $source is the C source file, and $symbol is used for the symbol
+# argument passed to rtcd.pl.
+function (add_rtcd_build_step config output source symbol)
+ add_custom_command(
+ OUTPUT ${output}
+ COMMAND ${PERL_EXECUTABLE}
+ ARGS "${AOM_ROOT}/build/make/rtcd.pl"
+ --arch=${AOM_TARGET_CPU}
+ --sym=${symbol}
+ ${AOM_RTCD_FLAGS}
+ --config=${AOM_CONFIG_DIR}/${AOM_TARGET_CPU}_rtcd_config.rtcd
+ ${config}
+ > ${output}
+ DEPENDS ${config}
+ COMMENT "Generating ${output}"
+ WORKING_DIRECTORY ${AOM_CONFIG_DIR}
+ VERBATIM)
+ set_property(SOURCE ${source} PROPERTY OBJECT_DEPENDS ${output})
+ set_property(SOURCE ${output} PROPERTY GENERATED)
+endfunction ()
+
endif () # AOM_BUILD_CMAKE_AOM_OPTIMIZATION_CMAKE_