From db1de48291c9ce8316573eac84a9f0e56a8e1ac7 Mon Sep 17 00:00:00 2001 From: Alexandru Croitor Date: Mon, 8 Jun 2020 18:21:18 +0200 Subject: CMake: Fix failing plugin tests on MinGW MinGW plugins should not have the lib prefix in the shared library names. Do this manually for a couple of libraries, and also for the generic qt_add_cmake_library function. Amends 9b0e23ef8a915a8c58808fa356f771ecdb6f020c Change-Id: I1cfaf8fc046f86edd3e755adfa599aa0aa854ee3 Reviewed-by: Joerg Bornemann --- cmake/QtBuild.cmake | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'cmake') diff --git a/cmake/QtBuild.cmake b/cmake/QtBuild.cmake index 5c12c93bba..184153543d 100644 --- a/cmake/QtBuild.cmake +++ b/cmake/QtBuild.cmake @@ -3895,6 +3895,10 @@ function(qt_add_cmake_library 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() else() add_library("${target}") endif() -- cgit v1.2.3