Commit 515aca9f authored by Tom Finegan's avatar Tom Finegan

Move rtcd target setup function to aom_optimization.cmake.

Addresses a TODO. Also clean up some minor formatting nits.

Change-Id: Iced790a214cfdd703eef21f2a9976f8a07517897
parent 872e5856
......@@ -376,26 +376,6 @@ foreach(NUM RANGE ${AOM_RTCD_CUSTOM_COMMAND_COUNT})
OUTPUT_FILE ${AOM_RTCD_HEADER_FILE})
endforeach()
# TODO(tomfinegan): Move this to aom_optimization.cmake.
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 ()
# Generate aom_version.h.
execute_process(
COMMAND ${CMAKE_COMMAND}
......
......@@ -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_
......@@ -11,8 +11,8 @@
cmake_minimum_required(VERSION 3.5)
set(REQUIRED_ARGS
"AOM_ROOT" "AOM_CONFIG_DIR" "CMAKE_INSTALL_PREFIX" "CMAKE_PROJECT_NAME"
"CONFIG_MULTITHREAD" "HAVE_PTHREAD_H")
"AOM_ROOT" "AOM_CONFIG_DIR" "CMAKE_INSTALL_PREFIX" "CMAKE_PROJECT_NAME"
"CONFIG_MULTITHREAD" "HAVE_PTHREAD_H")
foreach (arg ${REQUIRED_ARGS})
if ("${${arg}}" STREQUAL "")
......@@ -55,4 +55,3 @@ else ()
file(APPEND "${pkgconfig_file}" "Libs.private: -lm\n")
endif ()
file(APPEND "${pkgconfig_file}" "Cflags: -I${prefix}/include\n")
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment