Add the output of qlalr to the consuming target source files

The qlalr outputs need to be added to the consuming target.

Change-Id: I9600729103298cf7e0a712d5f3dc49c5f4c729f5
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
This commit is contained in:
Alexey Edelev 2022-07-12 11:13:00 +02:00
parent a29af6656f
commit d2edee6152

View File

@ -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()