Skip to content

Commit cc99495

Browse files
[qt] set lib property for plugins
1 parent 7ce183d commit cc99495

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

recipes/qt/5.x.x/conanfile.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1075,7 +1075,12 @@ def _create_plugin(pluginname, libname, plugintype, requires):
10751075
assert componentname not in self.cpp_info.components, f"Plugin {pluginname} already present in self.cpp_info.components"
10761076
self.cpp_info.components[componentname].set_property("cmake_target_name", f"Qt5::{pluginname}")
10771077
self.cpp_info.components[componentname].set_property("cmake_target_aliases", [f"Qt::{pluginname}"])
1078-
if not self.options.shared:
1078+
if not (self.settings.os == "Windows" and bool(self.options.shared)):
1079+
# Can't populate this property for Shared builds on Windows as
1080+
# CMake `find_library` expects to find an import lib which doesn't exist for plugins.
1081+
# See eg:
1082+
# * https://discourse.cmake.org/t/find-library-wont-find-dlls/4050/4
1083+
# * https://github.com/conan-io/conan/issues/12654
10791084
self.cpp_info.components[componentname].libs = [libname + libsuffix]
10801085
self.cpp_info.components[componentname].libdirs = [os.path.join("plugins", plugintype)]
10811086
self.cpp_info.components[componentname].includedirs = []

0 commit comments

Comments
 (0)