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

Small issues when building on Windows with MSVC #71

Closed
xclaesse opened this issue May 10, 2021 · 5 comments
Closed

Small issues when building on Windows with MSVC #71

xclaesse opened this issue May 10, 2021 · 5 comments

Comments

@xclaesse
Copy link

Since I wrote a blog post about building GTK4 applications on Windows, someone asked about gtkmm, so I gave it a try.
https://www.collabora.com/news-and-blog/blog/2021/04/29/build-your-own-application-with-gtk4-as-a-meson-subproject/

I noticed a few things that can be improved:

  • Fallback for find_program('mm-common-get', required: false) does not work. If the program is not required Meson prefer not using the fallback subproject. Changing it to find_program('mm-common-get', required: maintainer_mode) would make more sense since you error() just below anyway.
  • Building doc requires many extra deps (perl, etc), would be nice to make that optinal by default using a feature option that defaults to auto.
  • When disabling documentation, 'doxytagfile': tag_file.full_path() fails because tag_file is not defined.
@xclaesse
Copy link
Author

  • Building doc requires many extra deps (perl, etc), would be nice to make that optinal by default using a feature option that defaults to auto.

  • When disabling documentation, 'doxytagfile': tag_file.full_path() fails because tag_file is not defined.

I don't know where to report cairomm issues, but those 2 are copy/pasted into cairomm, so should be changed there too ideally.

@xclaesse
Copy link
Author

Seems copy/pasted into glibmm too.

@kjellahl
Copy link
Contributor

I don't know where to report cairomm issues

Report at https://gitlab.freedesktop.org/cairo/cairomm/-/issues
But you don't have to do that in this case. All 3 items in this issue are
identical or very similar in libsigc++, cairomm, glibmm, atkmm, pangomm, gtkmm
and libxml++. (Atkmm and libxml++ are not used by gtkmm4.)

Fallback for find_program('mm-common-get', required: false) does not work. If the program is not required Meson prefer not using the fallback subproject. Changing it to find_program('mm-common-get', required: maintainer_mode) would make more sense since you error() just below anyway.

Don't you find my error() message more informative than Meson's error message,
just telling that mm-common-get could not be found?

Which version of Meson do you use? Only versions >=0.55.0 understand the [provide]
section in mm-common.wrap.

@xclaesse
Copy link
Author

Don't you find my error() message more informative than Meson's error message,
just telling that mm-common-get could not be found?

It's true that error message is more informative, I agree.

Which version of Meson do you use? Only versions >=0.55.0 understand the [provide]
section in mm-common.wrap.

I know, I'm the one who implemented that feature in meson, I'm using master :D

The problem here is Meson will not search in the [provide] section for optional programs find_program('mm-common-get', required: false), it will look for fallback only if required: true. I realize it's not documented behaviour, it's only documented in the dependency() case: https://mesonbuild.com/Wrap-dependency-system-manual.html#provide-section.

Also, dependency() has allow_fallback: true argument that can be added to change that behaviour, but find_program() does not unfortunately.

kjellahl added a commit that referenced this issue May 13, 2021
* meson.build: If mm-common-get is not found in maintainer-mode
with 'required: false', try with 'required: true'.
Don't try to use tag_file, if documentation is not built.
* docs/docs/reference/meson.build: Don't use variables from modules
that don't define doxytagfile. These are subprojects that don't build
their documentation.

Fixes #71
kjellahl added a commit that referenced this issue May 13, 2021
* meson.build: If mm-common-get is not found in maintainer-mode
with 'required: false', try with 'required: true'.
Don't try to use tag_file, if documentation is not built.
* docs/docs/reference/meson.build: Don't use variables from modules
that don't define doxytagfile. These are subprojects that don't build
their documentation.

Fixes #71
@kjellahl
Copy link
Contributor

I have created PR #72 with possible fixes for 2 of your 3 issues. Comments?

kjellahl added a commit that referenced this issue May 14, 2021
* meson.build: If mm-common-get is not found in maintainer-mode
with 'required: false', try with 'required: true'.
Don't try to use tag_file, if documentation is not built.
* docs/reference/meson.build: Don't use variables from modules
that don't define doxytagfile. These are subprojects that don't build
their documentation.

Fixes #71
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants