CMake build system for G'MIC

I’ll look into that, it’s definitely a mistake and should be easy enough to fix…

Great, @Carmelo_DrRaw! I will test when ready.

What would be the custom path you would suggest? Something like

${CMAKE_INSTALL_PREFIX}/gimp/2.0/plug-ins/gmic_gimp

or

${CMAKE_INSTALL_PREFIX}/lib/gimp/2.0/plug-ins/gmic_gimp

The first would be preferable as it’s more customizable. Though by the same logic, ${CMAKE_INSTALL_PREFIX}/gmic_gimp would be best. But that would require using a unique variable. If it’s a problem, either is fine.

The question of which CMake variable is the correct one to use: “gmic_gimp” is not a library, its an executable, right? But its in the /lib/ folder… Don’t lose any sleep over it, I can work with whatever you choose as long as I can use a custom folder prefix.

We can also introduce an ad-hoc PLUGIN_INSTALL_PREFIX, since as you say this is not really a standard installation path…

Hello, @Carmelo_DrRaw have you had a chance to look into the custom install folder issue?

Hey ho @Carmelo_DrRaw

Hi @Morgan_Hardwood, sorry for the silence… I was actually planning to put back my hands on this today, while the new photoflow UI is in the “decanter”.

The easiest solution seems to be:

  • install into PLUGIN_INSTALL_PREFIX if the variable is set
  • install in the system-wide GIMP prefix if PLUGIN_INSTALL_PREFIX variable is not set

I’ve created a pull request for the modification, if you want to follow: Added custom plug-in install option by aferrero2707 · Pull Request #8 · dtschump/gmic · GitHub

1 Like

Thanks Andrea, the request has been accepted and is now a part of the official repo.

2 Likes

@Carmelo_DrRaw @David_Tschumperle commit tested and confirmed to work well, thanks!
As such, in my next bout of free time I will update the G’MIC ebuild in Gentoo to use the new, way simpler CMake system.

1 Like

For anyone interested, these are the complete steps to compile G’MIC from git, tweak the paths to taste:

cd ~/programs
git clone https://github.com/dtschump/gmic.git code-gmic
cd code-gmic/
mkdir build
cd build
cmake \
    -DCMAKE_INSTALL_PREFIX="$HOME/programs/gmic" \
    -DPLUGIN_INSTALL_PREFIX="$HOME/programs/gmic/plugin" ../
make -j8 install
4 Likes

@Carmelo_DrRaw @David_Tschumperle Gentoo has added the CMake-using G’MIC into portage but they still needed to make some changes. Do you think you could adapt these?
https://gitweb.gentoo.org/repo/gentoo.git/tree/media-gfx/gmic/files/gmic-1.7.8-cmake.patch

I will have a look…

@Carmelo_DrRaw, could you review this pull request please ?

https://github.com/dtschump/gmic/pull/10

Thanks :slight_smile:

Pull request checked & approved. Maybe @Morgan_Hardwood could check if everything builds fine on his gentoo system?

G’MIC git master commit c6d581 compiled fine here.

1 Like