meson: Unify scattered macOS-specific code

This commit is contained in:
Bruno Lopes 2026-03-29 07:30:51 -03:00
parent 66d5e9c9f9
commit 3a4ceb0b3a

View file

@ -192,10 +192,6 @@ platform_osx = (
host_os.contains('darwin')
)
if platform_osx
conf.set('PLATFORM_OSX', 1)
endif
if platform_windows
windows = import('windows')
# AC_CHECK_PROG(ms_librarian, lib.exe, yes, no)
@ -217,9 +213,12 @@ endif
osx_ldflags = []
if platform_osx
conf.set('PLATFORM_OSX', 1)
add_languages('objc', native: true)
osx_ldflags += ['-Wl,-framework,Foundation', '-Wl,-framework,AppKit', '-ObjC']
add_project_link_arguments(osx_ldflags, language : ['objc', 'c'])
# libgimp_cflags += '-xobjective-c'
# libgimp_lflags += ['-framework', 'Cocoa']
endif
if cc.get_id() == 'gcc' and cc.version() == '7.2.0'
@ -1738,12 +1737,6 @@ conf.set_quoted('SBINDIR', prefix / get_option('sbindir'))
conf.set_quoted('SYSDATADIR', prefix / get_option('datadir'))
if platform_osx
# libgimp_cflags += '-xobjective-c'
# libgimp_lflags += ['-framework', 'Cocoa']
endif
################################################################################
# Generate files