CMake Build: Do not set "lib" prefix for modules (plugins)

CMake sets "lib" as default prefix for Windows-GNU platforms.

Change-Id: I49e3123c385610307c84c584a21f5f3827a6fafd
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
This commit is contained in:
Cristian Adam 2020-05-29 12:08:01 +02:00
parent 743c7234df
commit 9b0e23ef8a
2 changed files with 8 additions and 0 deletions

View File

@ -3115,6 +3115,10 @@ function(qt_internal_add_plugin target)
# but Qt plugins are actually suffixed with .dylib.
set_property(TARGET "${target}" PROPERTY SUFFIX ".dylib")
endif()
if(WIN32)
# CMake sets for Windows-GNU platforms the suffix "lib"
set_property(TARGET "${target}" PROPERTY PREFIX "")
endif()
endif()
qt_set_common_target_properties(${target})

View File

@ -1211,6 +1211,10 @@ function(qt6_add_plugin target)
# but Qt plugins are actually suffixed with .dylib.
set_property(TARGET "${target}" PROPERTY SUFFIX ".dylib")
endif()
if(WIN32)
# CMake sets for Windows-GNU platforms the suffix "lib"
set_property(TARGET "${target}" PROPERTY PREFIX "")
endif()
endif()
set(output_name ${target})