[Github-comments] [geany/geany] Support gtk-mac-integration by meson build (PR #3194)

Jiří Techet notifications at github.com
Sun May 8 13:21:05 UTC 2022


@techee commented on this pull request.



> @@ -6,3 +6,4 @@ option('api-docs', type : 'feature', description : 'enable to generate API docum
 option('gtkdoc', type : 'boolean', description : 'enable to generate gtk-doc compatible headers for the API')
 option('python-command', type: 'string', description: 'the default Python command')
 option('socket', type: 'boolean', description: 'enable if you want to detect a running instance')
+option('mac-integration', type: 'boolean', value: 'false', description: 'enable for improved macOS integration using the gtk-mac-integration library')

> Probably in-line with autotools but I wonder why this is off by default? Couldn't this default to on and maybe dynamically detect presence of the dependency (or simply require it unless mac-integration is explicitly disabled)?

At least for testing, I'd like to be able to manually override the auto-detected presence of the library. With autotools I just gave up ;-). I tried the following with meson:

```meson
mac_integration_dep = ['gtk-mac-integration', '3.0.1']
mac_integration = dependency(mac_integration_dep[0], version: '>= ' + mac_integration_dep[1],
	required: get_option('mac-integration').enabled())
deps_for_pc += ' ' + mac_integration_dep[0] + ' >= ' + mac_integration_dep[1]
```

assuming (based on the documentation) that `get_option('mac-integration').enabled()` would return `true` if explicitly enabled on the command-line and `false` if disabled or not specified. But I get
```
meson.build:27:0: ERROR: Unknown method "enabled" in object <[BooleanHolder] holds [bool]: True> of type BooleanHolder.
```
What am I doing wrong?

In any case, I don't think auto-enabling the library is that important. The library is probably not used by many applications and not normally installed and in fact, if Geany started using GtkApplication and GMenuModel, we could eliminate this dependency as its functionality is present in GTK now.


-- 
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/pull/3194#discussion_r867490774
You are receiving this because you are subscribed to this thread.

Message ID: <geany/geany/pull/3194/review/965440283 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.geany.org/pipermail/github-comments/attachments/20220508/d2ffe10d/attachment.htm>


More information about the Github-comments mailing list