diff options
author | Craig Scott <craig.scott@qt.io> | 2021-03-23 15:48:56 +1100 |
---|---|---|
committer | Craig Scott <craig.scott@qt.io> | 2021-03-29 18:10:22 +1100 |
commit | aa4a1006cbccbc180c600f9b4dc9e882bb5ed5ca (patch) | |
tree | 93a1b56b677e453d52f5bf5ff991fb423ee0b8b7 /cmake/QtTargetHelpers.cmake | |
parent | 2801c1988742b18557c581a544a70a02f4faefa1 (diff) |
Refactor qt_internal_add_plugin() and qt6_add_plugin()
Remove code duplication by calling qt6_add_plugin() from
qt_internal_add_plugin().
Separate out the public and internal arguments for the
variables defined in QtBuild.cmake for these functions.
Provide them via commands instead for greater robustness.
This separation allows other Qt repos to access the appropriate
set of keywords where they define commands that forward
on to *_add_plugin() in their implementations. Retain
the old variables for now to simplify the integration
steps for updating other repos. The old variables can
be removed once there are no more references left to
them in any repo.
Task-number: QTBUG-88763
Pick-to: 6.1
Change-Id: I0105523afd95995923bd20fc963d245bbb15d34d
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Diffstat (limited to 'cmake/QtTargetHelpers.cmake')
-rw-r--r-- | cmake/QtTargetHelpers.cmake | 37 |
1 files changed, 0 insertions, 37 deletions
diff --git a/cmake/QtTargetHelpers.cmake b/cmake/QtTargetHelpers.cmake index 0caff0e484..99e84a2cd7 100644 --- a/cmake/QtTargetHelpers.cmake +++ b/cmake/QtTargetHelpers.cmake @@ -264,43 +264,6 @@ function(qt_internal_check_directory_or_type name dir type default result_var) endif() endfunction() -function(qt_internal_apply_win_prefix_and_suffix target) - if(WIN32) - # Table of prefix / suffixes for MSVC libraries as qmake expects them to be created. - # static - Qt6EdidSupport.lib (platform support libraries / or static QtCore, etc) - # shared - Qt6Core.dll - # shared import library - Qt6Core.lib - # module aka Qt plugin - qwindows.dll - # module import library - qwindows.lib - # - # The CMake defaults are fine for us. - - # Table of prefix / suffixes for MinGW libraries as qmake expects them to be created. - # static - libQt6EdidSupport.a (platform support libraries / or static QtCore, etc) - # shared - Qt6Core.dll - # shared import library - libQt6Core.a - # module aka Qt plugin - qwindows.dll - # module import library - libqwindows.a - # - # CMake for Windows-GNU platforms defaults the prefix to "lib". - # CMake for Windows-GNU platforms defaults the import suffix to ".dll.a". - # These CMake defaults are not ok for us. - - # This should cover both MINGW with GCC and CLANG. - if(NOT MSVC) - set_property(TARGET "${target}" PROPERTY IMPORT_SUFFIX ".a") - - get_target_property(target_type ${target} TYPE) - if(target_type STREQUAL "STATIC_LIBRARY") - set_property(TARGET "${target}" PROPERTY PREFIX "lib") - else() - set_property(TARGET "${target}" PROPERTY PREFIX "") - set_property(TARGET "${target}" PROPERTY IMPORT_PREFIX "lib") - endif() - endif() - endif() -endfunction() - function(qt_internal_strip_target_directory_scope_token target out_var) # In CMake versions earlier than CMake 3.18, a subdirectory scope id is appended to the # target name if the target is referenced in a target_link_libraries command from a |