I am trying to build gedit and gedit-plugins using Meson on Fedora 34. Here I am using the fedora:34
container as the environment.
First I build gedit and install it to /opt
, which works fine.
sudo dnf install meson ninja-build git
sudo dnf install 'dnf-command(builddep)'
sudo dnf builddep gedit
git clone https://gitlab.gnome.org/GNOME/gedit.git
cd gedit
mkdir build && cd build
meson --prefix /opt
ninja
sudo ninja install
cd ..
Now I want to build gedit-plugins and use the previous built gedit as a dependency.
git clone https://gitlab.gnome.org/GNOME/gedit-plugins.git
cd gedit-plugins
mkdir build && cd build
meson --prefix /opt
However, the last meson --prefix /opt
command fails:
Run-time dependency gedit found: NO (tried pkgconfig)
../meson.build:29:0: ERROR: Dependency "gedit" not found, tried pkgconfig
A full log can be found at /gedit-plugins/build/meson-logs/meson-log.txt
I know that if I install gedit-devel
, then this dependency can be solved by providing header files in /usr/include/gedit-40.0/gedit/
. However, I would like meson to find header files in /opt/include/gedit-40.0/gedit/
automatically. How can I achieve this?
I tried LIBRARY_PATH=/opt meson --prefix /opt
and LIBRARY_PATH=/gedit/build meson --prefix /opt
, but neither work.