mirror of https://github.com/GNOME/gimp.git
Fix meson build on macos
This commit is contained in:
parent
d24713349d
commit
5d0b0ad467
|
@ -29,7 +29,7 @@ libappgui = static_library('appgui',
|
|||
include_directories: [ rootInclude, rootAppInclude, ],
|
||||
c_args: '-DG_LOG_DOMAIN="Gimp-GUI"',
|
||||
dependencies: [
|
||||
cairo, gegl, gdk_pixbuf, gio_specific, gtk3
|
||||
cairo, gegl, gdk_pixbuf, gio_specific, gtk3, gtk3_macos
|
||||
],
|
||||
install: false,
|
||||
)
|
||||
|
|
|
@ -180,6 +180,9 @@ else
|
|||
link_args = []
|
||||
endif
|
||||
|
||||
if platform_osx
|
||||
link_args += osx_ldflags
|
||||
endif
|
||||
|
||||
gimpconsole_exe = executable('gimp-console-'+gimp_app_version,
|
||||
'main.c',
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
if platform_osx
|
||||
add_project_arguments('-ObjC', language : 'c')
|
||||
endif
|
||||
|
||||
gimpversion = configure_file(
|
||||
input : 'gimpversion.h.in',
|
||||
|
|
14
meson.build
14
meson.build
|
@ -143,7 +143,9 @@ platform_osx = (
|
|||
host_os.contains('darwin')
|
||||
)
|
||||
|
||||
conf.set('PLATFORM_OSX', platform_osx)
|
||||
if platform_osx
|
||||
conf.set('PLATFORM_OSX', 1)
|
||||
endif
|
||||
|
||||
if platform_windows
|
||||
windows = import('windows')
|
||||
|
@ -152,6 +154,14 @@ if platform_windows
|
|||
# compiler_args += '-Wl,--large-address-aware'
|
||||
endif
|
||||
|
||||
# on OSX ObjC and C sources are mixed so adding objc to the linkflags
|
||||
|
||||
osx_ldflags = []
|
||||
if platform_osx
|
||||
add_languages('objc')
|
||||
osx_ldflags += ['-Wl,-framework,Foundation', '-Wl,-framework,AppKit', '-ObjC']
|
||||
add_project_link_arguments(osx_ldflags, language : ['objc', 'c'])
|
||||
endif
|
||||
|
||||
if cc.get_id() == 'gcc' and cc.version() == '7.2.0'
|
||||
gcc_warning = '''
|
||||
|
@ -1030,7 +1040,7 @@ endif
|
|||
|
||||
|
||||
# Check for GTK Mac Integration
|
||||
if platform_osx and (gtk3.get_pkgconfig_variable('targets').contains('xquartz'))
|
||||
if platform_osx and (gtk3.get_pkgconfig_variable('targets').contains('quartz'))
|
||||
gtk3_macos = dependency('gtk-mac-integration', version: '>=2.0.0')
|
||||
else
|
||||
gtk3_macos = no_dep
|
||||
|
|
Loading…
Reference in New Issue