diff options
author | Craig Scott <craig.scott@qt.io> | 2021-03-31 13:56:51 +1100 |
---|---|---|
committer | Craig Scott <craig.scott@qt.io> | 2021-03-31 18:30:04 +1100 |
commit | 256dea0df74dc05ded438b33b6be8735048fd402 (patch) | |
tree | fd2b018e41e679b77580973bcc2f6b69b33e1b3a /cmake/QtExecutableHelpers.cmake | |
parent | 87a4841cb642408f8d30159a21cdb0fca4245e2d (diff) |
Avoid using prohibited target property names with INTERFACE targets
CMake 3.19 removed the restrictions on allowable names for properties
on INTERFACE targets. With earlier CMake versions (back to CMake 3.11),
names for custom properties must begin with either a lowercase letter
or an underscore.
In 5807e1ae81 (Add plugins to Qt tools and executables for static
builds, 2021-03-19), the names QT_REPO_PLUGIN_CLASS_NAMES and
QT_REPO_PLUGINS were used, but in some cases, the targets on which they
were being set are INTERFACE targets. Replace these with names that
are supported with CMake 3.11 or later.
Amends 5807e1ae8168a5702ad0f6890d2b35223cfebdee
Task-number: QTBUG-91915
Pick-to: 6.1
Change-Id: Ife702a1fb339b190d46a8dafb380253219199ba6
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Diffstat (limited to 'cmake/QtExecutableHelpers.cmake')
-rw-r--r-- | cmake/QtExecutableHelpers.cmake | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/cmake/QtExecutableHelpers.cmake b/cmake/QtExecutableHelpers.cmake index c2ad66c484..d96f2edaa1 100644 --- a/cmake/QtExecutableHelpers.cmake +++ b/cmake/QtExecutableHelpers.cmake @@ -197,7 +197,7 @@ function(qt_internal_add_executable name) endif() string(MAKE_C_IDENTIFIER "${name}_plugin_imports_${lib}" out_file) string(APPEND out_file .cpp) - set(class_names "$<GENEX_EVAL:$<TARGET_PROPERTY:${lib},QT_REPO_PLUGIN_CLASS_NAMES>>") + set(class_names "$<GENEX_EVAL:$<TARGET_PROPERTY:${lib},_qt_repo_plugin_class_names>>") file(GENERATE OUTPUT ${out_file} CONTENT "// This file is auto-generated. Do not edit. #include <QtPlugin> @@ -209,7 +209,7 @@ Q_IMPORT_PLUGIN($<JOIN:${class_names},)\nQ_IMPORT_PLUGIN(>) target_sources(${name} PRIVATE "$<$<NOT:$<STREQUAL:${class_names},>>:${out_file}>" ) - target_link_libraries(${name} PRIVATE "$<TARGET_PROPERTY:${lib},QT_REPO_PLUGINS>") + target_link_libraries(${name} PRIVATE "$<TARGET_PROPERTY:${lib},_qt_repo_plugins>") endforeach() endif() endfunction() |