diff options
author | Leander Beernaert <leander.beernaert@qt.io> | 2019-10-21 11:31:28 +0200 |
---|---|---|
committer | Leander Beernaert <leander.beernaert@qt.io> | 2019-10-21 10:04:22 +0000 |
commit | 51979657a128c19ff8ce52eda345b256ba62de80 (patch) | |
tree | efd026e3f89a8a9fdae02a179db65a6b7e9f7b86 /cmake | |
parent | 78b89547ad00153a8e02553a2e87d45415bd2314 (diff) |
Add ALLOW_UNDEFINED_SYMBOLS to add_qt_plugin
Allow plugins to be built with undefined symbols when
ALLOW_UNDEFINED_SYMBOLS is specified.
Change-Id: I6bc809e3e5257302157bf8484f850d8319674a4a
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'cmake')
-rw-r--r-- | cmake/QtBuild.cmake | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/cmake/QtBuild.cmake b/cmake/QtBuild.cmake index a3b92d620b..3b9e912edb 100644 --- a/cmake/QtBuild.cmake +++ b/cmake/QtBuild.cmake @@ -1741,7 +1741,7 @@ endfunction() # Collection of add_qt_plugin arguments so they can be shared across different # plugin type wrappers set(__add_qt_plugin_optional_args - "STATIC;EXCEPTIONS" + "STATIC;EXCEPTIONS;ALLOW_UNDEFINED_SYMBOLS" ) set(__add_qt_plugin_single_args "TYPE;CLASS_NAME;OUTPUT_DIRECTORY;INSTALL_DIRECTORY;ARCHIVE_INSTALL_DIRECTORY;QML_TARGET_PATH" @@ -1947,9 +1947,11 @@ function(add_qt_plugin target) # Store the plug-in type in the target property set_property(TARGET "${target}" PROPERTY QT_PLUGIN_TYPE "${arg_TYPE}") - ### fixme: cmake is missing a built-in variable for this. We want to apply it only to modules and plugins - # that belong to Qt. - qt_internal_add_link_flags_no_undefined("${target}") + if (NOT arg_ALLOW_UNDEFINED_SYMBOLS) + ### fixme: cmake is missing a built-in variable for this. We want to apply it only to + # modules and plugins that belong to Qt. + qt_internal_add_link_flags_no_undefined("${target}") + endif() qt_internal_add_linker_version_script(${target}) endfunction() |