Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Workaround for conan qmake generator bug which causes failure to build QWT dll #7232

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
7 changes: 7 additions & 0 deletions recipes/qwt/all/conanfile.py
Expand Up @@ -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
Copy link
Contributor

@Croydon Croydon Sep 14, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The PR is now merged. How fast are you able to update your Conan client(s), when it will be released?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some weeks. We usually wait for a minor (fix) version.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@prince-chrismc looks to be correct.
_patch_qmake_generator_files will not break the new 1.40.1, and will allow this revision to work for previous conan versions as well. If that isn't desirable, we can cancel this PR.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we do ditch this change, we should replace it with:
required_conan_version = ">=1.40.1"

# 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)
Expand Down