mirror of
https://github.com/kovidgoyal/kitty.git
synced 2024-11-13 12:09:35 +03:00
macOS: Fix detection for notification API
For some reason it can happen that the `UserNotifications` framework exists but the `UserNotifications/UserNotifications.h` header doesn't. Closes https://github.com/kovidgoyal/kitty/issues/3042.
This commit is contained in:
parent
92a705c79e
commit
46ef2f313b
5
setup.py
5
setup.py
@ -343,7 +343,10 @@ def kitty_env() -> Env:
|
||||
platform_libs = [
|
||||
'-framework', 'CoreText', '-framework', 'CoreGraphics',
|
||||
]
|
||||
user_notifications_framework = first_successful_compile(ans.cc, '-framework UserNotifications')
|
||||
test_program_src = '''#include <UserNotifications/UserNotifications.h>
|
||||
int main(void) { return 0; }\n'''
|
||||
user_notifications_framework = first_successful_compile(ans.cc, ' -framework UserNotifications',
|
||||
src=test_program_src, lang='objective-c')
|
||||
if user_notifications_framework:
|
||||
platform_libs.extend(shlex.split(user_notifications_framework))
|
||||
else:
|
||||
|
Loading…
Reference in New Issue
Block a user