mirror of
https://gitlab.gnome.org/GNOME/gimp.git
synced 2025-10-06 01:12:40 +02:00
Our build files were relying 'sysroot' to find gexiv2.h but this is not possible with Apple Clang om which sysroot points to macOS SDK. So, exotic environments like Homebrew were failing. Let's fix this.
116 lines
2.7 KiB
Meson
116 lines
2.7 KiB
Meson
# C version
|
|
|
|
extension_name = 'org.gimp.extension.goat-exercises'
|
|
plug_in_name = 'goat-exercise'
|
|
|
|
plugin_sources = [
|
|
'goat-exercise-c.c',
|
|
]
|
|
|
|
if platform_windows
|
|
plugin_sources += windows.compile_resources(
|
|
gimp_plugins_rc,
|
|
args: [
|
|
'--define', 'ORIGINALFILENAME_STR="@0@"'.format(plug_in_name + '-c.exe'),
|
|
'--define', 'INTERNALNAME_STR="@0@"' .format(plug_in_name),
|
|
'--define', 'TOP_SRCDIR="@0@"' .format(meson.project_source_root()),
|
|
],
|
|
include_directories: [
|
|
rootInclude, appInclude,
|
|
],
|
|
)
|
|
endif
|
|
|
|
exe = executable(plug_in_name + '-c',
|
|
plugin_sources,
|
|
dependencies: [
|
|
libgimpui_dep,
|
|
math,
|
|
],
|
|
install: true,
|
|
install_dir: gimpplugindir / 'extensions' / extension_name,
|
|
win_subsystem: 'windows',
|
|
)
|
|
|
|
# XXX This is so ugly!
|
|
# From meson 0.54.0, we will be able to use exe.name().
|
|
plug_ins = exe.full_path().split('/')[-1].split('\\')[-1]
|
|
|
|
install_data(
|
|
'goat-exercise-c.c',
|
|
install_dir: gimpplugindir / 'extensions' / extension_name,
|
|
)
|
|
|
|
# Vala version
|
|
|
|
if have_vala and have_gobject_introspection
|
|
exe = executable('goat-exercise-vala',
|
|
'goat-exercise-vala.vala',
|
|
include_directories: [ rootInclude, ],
|
|
dependencies: [
|
|
libgimp_vapi, libgimpui_vapi, libgimpui_dep, math,
|
|
],
|
|
c_args: [
|
|
'-DGETTEXT_PACKAGE="@0@"'.format('org.gimp.extension.goat-exercises'),
|
|
'-w',
|
|
],
|
|
install: true,
|
|
install_dir: gimpplugindir / 'extensions' / extension_name,
|
|
win_subsystem: 'windows',
|
|
)
|
|
plug_ins = plug_ins + ':' + exe.full_path().split('/')[-1].split('\\')[-1]
|
|
|
|
install_data(
|
|
'goat-exercise-vala.vala',
|
|
install_dir: gimpplugindir / 'extensions' / extension_name,
|
|
)
|
|
endif
|
|
|
|
# Python 3 (pygobject) version.
|
|
|
|
install_data(
|
|
'goat-exercise-py3.py',
|
|
install_dir: gimpplugindir / 'extensions' / extension_name,
|
|
)
|
|
plug_ins = plug_ins + ':goat-exercise-py3.py'
|
|
|
|
# Javascript (GJS) version.
|
|
|
|
if have_javascript
|
|
install_data(
|
|
'goat-exercise-gjs.js',
|
|
install_dir: gimpplugindir / 'extensions' / extension_name,
|
|
)
|
|
plug_ins = plug_ins + ':goat-exercise-gjs.js'
|
|
endif
|
|
|
|
# Lua (lua-jit + LGI) version.
|
|
|
|
if have_lua
|
|
install_data(
|
|
'goat-exercise-lua.lua',
|
|
install_dir: gimpplugindir / 'extensions' / extension_name,
|
|
)
|
|
plug_ins = plug_ins + ':goat-exercise-lua.lua'
|
|
endif
|
|
|
|
# Generate the AppData.
|
|
|
|
conf = configuration_data()
|
|
conf.set('GOAT_EXERCISES', plug_ins)
|
|
|
|
appdatafilename = 'org.gimp.extension.goat-exercises.metainfo.xml'
|
|
appdatafilein = configure_file(
|
|
input : appdatafilename + '.in.in',
|
|
output: appdatafilename + '.in',
|
|
configuration: conf,
|
|
)
|
|
|
|
appdatafile = i18n.merge_file(
|
|
input : [ appdatafilein, ],
|
|
output: appdatafilename,
|
|
po_dir: po_plug_ins_dir,
|
|
install: true,
|
|
install_dir: gimpplugindir / 'extensions' / extension_name,
|
|
)
|