CMake: Treat Qt plugins as MODULE libraries

CMake will complain if you try to use a plugin in target_link_libraries,
and it won't produce import libraries on windows, or use .so.number
on Linux.

Change-Id: I6f0cf8267b3c0e6e5c888703596afe59b3a39141
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
This commit is contained in:
Cristian Adam 2019-06-04 14:38:24 +02:00
parent b61c4e6a7d
commit 653666008c

View File

@ -1368,7 +1368,7 @@ function(add_qt_plugin target)
if(arg_STATIC)
add_library("${target}" STATIC)
else()
add_library("${target}")
add_library("${target}" MODULE)
endif()
qt_internal_add_target_aliases("${target}")