Commit e5d97048 authored by Tom Schoonjans's avatar Tom Schoonjans

Fix build on macOS

parent 02e21429
Pipeline #77451 passed with stage
in 10 minutes and 15 seconds
......@@ -137,9 +137,20 @@ libgedit_deps = [
if windowing_target == 'quartz'
libgedit_sources += files(
'gedit-app-osx.c',
'gedit-file-chooser-dialog-osx.c',
'gedit-app-osx.m',
'gedit-file-chooser-dialog-osx.m',
)
libgedit_c_args += [
'-DOS_OSX=1',
]
libgedit_link_args += [
'-Wl,-framework', '-Wl,Foundation',
'-Wl,-framework', '-Wl,AppKit',
]
gtk_mac_integration_dep = dependency('gtk-mac-integration-gtk3')
libgedit_deps += [
gtk_mac_integration_dep,
]
elif windowing_target == 'win32'
libgedit_sources += files(
'gedit-app-win32.c',
......@@ -293,6 +304,12 @@ gedit_c_args = [
'-DHAVE_CONFIG_H',
]
if windowing_target == 'quartz'
gedit_c_args += [
'-DOS_OSX=1',
]
endif
gedit_deps = [
libgedit_dep,
]
......
......@@ -139,6 +139,14 @@ configure_file(
configuration: config_h
)
module_suffix = []
# Keep the autotools convention for shared module suffix because GModule
# depends on it: https://gitlab.gnome.org/GNOME/glib/issues/520
if ['darwin', 'ios'].contains(host_machine.system())
module_suffix = 'so'
add_languages('objc')
endif
# Options
build_plugins = get_option('plugins')
......
......@@ -21,7 +21,8 @@ libcheckupdate_sha = shared_module(
install_dir: join_paths(
pkglibdir,
'plugins',
)
),
name_suffix: module_suffix,
)
custom_target(
......
......@@ -22,7 +22,8 @@ libdocinfo_sha = shared_module(
install_dir: join_paths(
pkglibdir,
'plugins',
)
),
name_suffix: module_suffix,
)
custom_target(
......
......@@ -73,7 +73,8 @@ libfilebrowser_sha = shared_module(
install_dir: join_paths(
pkglibdir,
'plugins',
)
),
name_suffix: module_suffix,
)
# FIXME: https://github.com/mesonbuild/meson/issues/1687
......
......@@ -21,7 +21,8 @@ libmodelines_sha = shared_module(
install_dir: join_paths(
pkglibdir,
'plugins',
)
),
name_suffix: module_suffix,
)
custom_target(
......
......@@ -20,7 +20,8 @@ libquickhighlight_sha = shared_module(
install_dir: join_paths(
pkglibdir,
'plugins',
)
),
name_suffix: module_suffix,
)
custom_target(
......
......@@ -22,7 +22,8 @@ libsort_sha = shared_module(
install_dir: join_paths(
pkglibdir,
'plugins',
)
),
name_suffix: module_suffix,
)
custom_target(
......
......@@ -24,7 +24,8 @@ libspell_sha = shared_module(
install_dir: join_paths(
pkglibdir,
'plugins',
)
),
name_suffix: module_suffix,
)
configure_file(
......
......@@ -38,7 +38,8 @@ libtime_sha = shared_module(
install_dir: join_paths(
pkglibdir,
'plugins',
)
),
name_suffix: module_suffix,
)
configure_file(
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment