diff options
author | Alexandru Croitor <alexandru.croitor@qt.io> | 2022-10-27 13:17:09 +0200 |
---|---|---|
committer | Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> | 2022-10-28 11:24:14 +0000 |
commit | 550b762fe0fe6173c6e3a5aa0d7323d0071e9ca5 (patch) | |
tree | 81358a19a41b87522839a8c07006bbb38aa153f8 | |
parent | 9166d8bbbb82b07882d8757b655270bcd5dd0013 (diff) |
CMake: Fix "no rc file" case when running idc
In case if no rc file is present in the sources of a target that
has qt6_add_axserver_library called on it, the build would fail
with unknown command when trying to run the "echo" part of the
command.
This happens because cmd.exe interprets the echo and its argument as a
single argument, despite the space between then.
Use $<SEMICOLON> in conjunction with COMMAND_EXPAND_LISTS to ensure
the echo and the argument that follows it are split.
Also remove the extra quotes which are not needed.
Tested to work with powershell and cmd.exe with
CMake 3.16.9, 3.17.4, 3.18.4, 3.21.2, 3.24.2.
Amends 2b8681267a1f79734b379b7d7776c520de7be5b5
Change-Id: If81f7f6947e35709ce4cf1a0333247fb238cf73a
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
(cherry picked from commit 1908117dbbb1e51fe74baac0c0a0d3423bc41152)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
-rw-r--r-- | src/activeqt/control/Qt6AxServerMacros.cmake | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/activeqt/control/Qt6AxServerMacros.cmake b/src/activeqt/control/Qt6AxServerMacros.cmake index df7a643..24cbaab 100644 --- a/src/activeqt/control/Qt6AxServerMacros.cmake +++ b/src/activeqt/control/Qt6AxServerMacros.cmake @@ -85,8 +85,8 @@ function(qt6_target_idl target) set(rc_files "$<FILTER:$<TARGET_PROPERTY:${target},SOURCES>,INCLUDE,\\.rc$>") set(have_rc_files "$<NOT:$<BOOL:$<STREQUAL:${rc_files},>>>") - set(no_rc_cmd "echo \"No rc-file linked into project. The type library of the ${target} \ -target will be a separate file.\"") + set(no_rc_cmd "echo$<SEMICOLON>No rc-file linked into project. The type library of the \ +${target} target will be a separate file.") set(idc_args "$<SEMICOLON>$<TARGET_FILE:${target}>$<SEMICOLON>/tlb$<SEMICOLON>${output_tlb}") |