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

fix glib compilation with msvc-clang #10029

Closed
Changes from 1 commit
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
8 changes: 6 additions & 2 deletions recipes/glib/all/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,10 @@ class GLibConan(ConanFile):
short_paths = True
generators = "pkg_config"

@property
def _is_clang_cl(self):
return self.settings.os == 'Windows' and self.settings.compiler == 'clang'
AndreyMlashkin marked this conversation as resolved.
Show resolved Hide resolved

@property
def _is_msvc(self):
return self.settings.compiler == "Visual Studio" or self.settings.compiler == "msvc"
Expand Down Expand Up @@ -167,7 +171,7 @@ def build(self):
self._patch_sources()
with tools.environment_append(
VisualStudioBuildEnvironment(self).vars
) if self._is_msvc else tools.no_op():
) if self._is_msvc or self._is_clang_cl else tools.no_op():
AndreyMlashkin marked this conversation as resolved.
Show resolved Hide resolved
meson = self._configure_meson()
meson.build()

Expand All @@ -183,7 +187,7 @@ def package(self):
self.copy(pattern="COPYING", dst="licenses", src=self._source_subfolder)
with tools.environment_append(
VisualStudioBuildEnvironment(self).vars
) if self._is_msvc else tools.no_op():
) if self._is_msvc or self._is_clang_cl else tools.no_op():
AndreyMlashkin marked this conversation as resolved.
Show resolved Hide resolved
meson = self._configure_meson()
meson.install()
self._fix_library_names()
Expand Down