summaryrefslogtreecommitdiff
path: root/Meta/CMake/utils.cmake
diff options
context:
space:
mode:
authorTimothy Flynn <trflynn89@pm.me>2022-10-26 15:57:30 -0400
committerAndreas Kling <kling@serenityos.org>2022-10-27 12:59:56 +0200
commitb5a876e606be7133d2728758df6a158f543fac73 (patch)
tree34afc0d975743b7d616a9a35a95fc64c5763c757 /Meta/CMake/utils.cmake
parente73aeb4cea77d7cc38931771178d1e7a489498e9 (diff)
downloadserenity-b5a876e606be7133d2728758df6a158f543fac73.zip
Meta: Allow specifying additional dependencies with invoke_generator
Diffstat (limited to 'Meta/CMake/utils.cmake')
-rw-r--r--Meta/CMake/utils.cmake4
1 files changed, 2 insertions, 2 deletions
diff --git a/Meta/CMake/utils.cmake b/Meta/CMake/utils.cmake
index 0518591a7b..b35493ee94 100644
--- a/Meta/CMake/utils.cmake
+++ b/Meta/CMake/utils.cmake
@@ -178,7 +178,7 @@ function(remove_path_if_version_changed version version_file cache_path)
endfunction()
function(invoke_generator name generator version_file header implementation)
- cmake_parse_arguments(invoke_generator "" "" "arguments" ${ARGN})
+ cmake_parse_arguments(invoke_generator "" "" "arguments;dependencies" ${ARGN})
add_custom_command(
OUTPUT "${header}" "${implementation}"
@@ -187,7 +187,7 @@ function(invoke_generator name generator version_file header implementation)
COMMAND "${CMAKE_COMMAND}" -E copy_if_different "${implementation}.tmp" "${implementation}"
COMMAND "${CMAKE_COMMAND}" -E remove "${header}.tmp" "${implementation}.tmp"
VERBATIM
- DEPENDS ${generator} "${version_file}"
+ DEPENDS ${generator} ${invoke_generator_dependencies} "${version_file}"
)
add_custom_target("generate_${name}" DEPENDS "${header}" "${implementation}")