diff --git a/recipes/qwt/all/conanfile.py b/recipes/qwt/all/conanfile.py index 9c52d58b09eba..1f9f8cceab81e 100644 --- a/recipes/qwt/all/conanfile.py +++ b/recipes/qwt/all/conanfile.py @@ -87,8 +87,15 @@ def _patch_qwt_config_files(self): qwtbuild += "CONFIG += force_debug_info\n" tools.save(qwtbuild_path, qwtbuild) + def _patch_qmake_generator_files(self): + # Work around the qmake generator bug (https://github.com/conan-io/conan/pull/9568) which + # causes exe linker flags to be set on DLL, causing link failure. + if self.settings.compiler == "Visual Studio": + tools.replace_in_file(os.path.join(self.build_folder, "conanbuildinfo.pri"), "CONAN_QMAKE_LFLAGS += -ENTRY:mainCRTStartup", "", strict=False) + def build(self): self._patch_qwt_config_files() + self._patch_qmake_generator_files() if self.settings.compiler == "Visual Studio": vcvars = tools.vcvars_command(self.settings)