summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAlexandru Croitor <alexandru.croitor@qt.io>2022-10-27 13:17:09 +0200
committerAlexandru Croitor <alexandru.croitor@qt.io>2022-10-28 13:09:40 +0200
commit1908117dbbb1e51fe74baac0c0a0d3423bc41152 (patch)
treeaea4e9fb95057a335f3ae81a6d2ea35a92185876 /src
parentfe41d5656f9c9494499061ccc0eb8d076de0e1f2 (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 Pick-to: 6.4 Change-Id: If81f7f6947e35709ce4cf1a0333247fb238cf73a Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Diffstat (limited to 'src')
-rw-r--r--src/activeqt/control/Qt6AxServerMacros.cmake4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/activeqt/control/Qt6AxServerMacros.cmake b/src/activeqt/control/Qt6AxServerMacros.cmake
index bcba546..38bccf0 100644
--- a/src/activeqt/control/Qt6AxServerMacros.cmake
+++ b/src/activeqt/control/Qt6AxServerMacros.cmake
@@ -88,8 +88,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}")