meson: improve/fix previous commit from MR !725.
- Setting an exec_dir variable is an error. As meson docs says, if
relative, it is installed relatively to prefix anyway: "If this is a
relative path, it is assumed to be relative to the prefix."
On the other hand, it would make problems if someone tried to set an
absolute bindir.
Moreover it is a lot clearer now. When we want to install in the
binary directory unconditionally, then get_option('bindir') is the
meson way, hence the way to go.
- On the other hand, the `gimp-debug-tool` is installed either in bindir
for Windows or macOS and libexecdir for all other platforms, at least
that's how it's set in the autotools build. So let's keep both builds
consistent.
- Make a hopefully clearer description for enable-default-bin option.
Let's clarify this is just about creating unversionning links pointing
to versionned files.
- Adding an item in the "Optional Features" part of the summary listing
during meson configure, for better discovery.
For the ".exe" extension on Windows, I wished we had an $(EXEEXT)
equivalent on meson rather than trying to set it ourselves (are there
other platforms where we must set a different extension?). But I could
not find any.
2022-08-29 12:39:49 +02:00
|
|
|
if platform_windows or platform_osx
|
|
|
|
gimp_debug_tool_dir = get_option('bindir')
|
|
|
|
else
|
|
|
|
gimp_debug_tool_dir = get_option('libexecdir')
|
|
|
|
endif
|
|
|
|
|
2017-11-01 14:27:13 +01:00
|
|
|
|
2022-08-31 13:10:13 +00:00
|
|
|
gimp_debug_tool = executable('gimp-debug-tool' + exec_ver,
|
2017-11-01 14:27:13 +01:00
|
|
|
'gimp-debug-tool.c',
|
|
|
|
include_directories: rootInclude,
|
|
|
|
dependencies: [
|
|
|
|
fontconfig,
|
|
|
|
gio,
|
|
|
|
gegl,
|
|
|
|
gtk3,
|
|
|
|
],
|
|
|
|
link_with: [
|
|
|
|
libapp,
|
|
|
|
libappwidgets,
|
2020-02-14 00:03:32 +01:00
|
|
|
libgimpbase,
|
2017-11-01 14:27:13 +01:00
|
|
|
],
|
2019-12-30 00:21:33 +01:00
|
|
|
install: true,
|
meson: improve/fix previous commit from MR !725.
- Setting an exec_dir variable is an error. As meson docs says, if
relative, it is installed relatively to prefix anyway: "If this is a
relative path, it is assumed to be relative to the prefix."
On the other hand, it would make problems if someone tried to set an
absolute bindir.
Moreover it is a lot clearer now. When we want to install in the
binary directory unconditionally, then get_option('bindir') is the
meson way, hence the way to go.
- On the other hand, the `gimp-debug-tool` is installed either in bindir
for Windows or macOS and libexecdir for all other platforms, at least
that's how it's set in the autotools build. So let's keep both builds
consistent.
- Make a hopefully clearer description for enable-default-bin option.
Let's clarify this is just about creating unversionning links pointing
to versionned files.
- Adding an item in the "Optional Features" part of the summary listing
during meson configure, for better discovery.
For the ".exe" extension on Windows, I wished we had an $(EXEEXT)
equivalent on meson rather than trying to set it ourselves (are there
other platforms where we must set a different extension?). But I could
not find any.
2022-08-29 12:39:49 +02:00
|
|
|
install_dir: gimp_debug_tool_dir
|
2017-11-01 14:27:13 +01:00
|
|
|
)
|
2022-08-29 13:41:08 +00:00
|
|
|
|
|
|
|
if enable_default_bin and meson.version().version_compare('>=0.61.0')
|
2022-08-31 13:10:13 +00:00
|
|
|
install_symlink(fs.name(gimp_debug_tool.full_path()).replace(exec_ver, ''),
|
|
|
|
pointing_to: fs.name(gimp_debug_tool.full_path()),
|
meson: improve/fix previous commit from MR !725.
- Setting an exec_dir variable is an error. As meson docs says, if
relative, it is installed relatively to prefix anyway: "If this is a
relative path, it is assumed to be relative to the prefix."
On the other hand, it would make problems if someone tried to set an
absolute bindir.
Moreover it is a lot clearer now. When we want to install in the
binary directory unconditionally, then get_option('bindir') is the
meson way, hence the way to go.
- On the other hand, the `gimp-debug-tool` is installed either in bindir
for Windows or macOS and libexecdir for all other platforms, at least
that's how it's set in the autotools build. So let's keep both builds
consistent.
- Make a hopefully clearer description for enable-default-bin option.
Let's clarify this is just about creating unversionning links pointing
to versionned files.
- Adding an item in the "Optional Features" part of the summary listing
during meson configure, for better discovery.
For the ".exe" extension on Windows, I wished we had an $(EXEEXT)
equivalent on meson rather than trying to set it ourselves (are there
other platforms where we must set a different extension?). But I could
not find any.
2022-08-29 12:39:49 +02:00
|
|
|
install_dir: gimp_debug_tool_dir
|
2022-08-29 13:41:08 +00:00
|
|
|
)
|
|
|
|
endif
|