From d2edee615214a5b6304150159814fa1c40e924b8 Mon Sep 17 00:00:00 2001 From: Alexey Edelev Date: Tue, 12 Jul 2022 11:13:00 +0200 Subject: [PATCH] Add the output of qlalr to the consuming target source files MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The qlalr outputs need to be added to the consuming target. Change-Id: I9600729103298cf7e0a712d5f3dc49c5f4c729f5 Reviewed-by: Alexandru Croitor Reviewed-by: Jörg Bornemann --- cmake/QtLalrHelpers.cmake | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/cmake/QtLalrHelpers.cmake b/cmake/QtLalrHelpers.cmake index 68af8b1578b..f67bbc489f3 100644 --- a/cmake/QtLalrHelpers.cmake +++ b/cmake/QtLalrHelpers.cmake @@ -52,8 +52,8 @@ function(qt_process_qlalr consuming_target input_file_list flags) "${absolute_input_file}") set(cpp_file "${parser}.cpp") - set(private_file "${parser}_p.h") - set(decl_file "${decl}") + set(private_file "${CMAKE_CURRENT_BINARY_DIR}/${parser}_p.h") + set(decl_file "${CMAKE_CURRENT_BINARY_DIR}/${decl}") set(impl_file "${impl}") add_custom_command( OUTPUT ${cpp_file} ${private_file} ${decl_file} ${impl_file} @@ -62,6 +62,7 @@ function(qt_process_qlalr consuming_target input_file_list flags) MAIN_DEPENDENCY ${input_file} VERBATIM ) - target_sources(${consuming_target} PRIVATE ${cpp_file} ${impl_file}) + target_sources(${consuming_target} PRIVATE ${cpp_file} ${impl_file} + ${private_file} ${decl_file}) endforeach() endfunction()