Ok, it was actually a 30 seconds modification… the build type now defaults to Release if nothing is specified.
I confirm, this works. I’ll include this file in the final release then, thank you !
Hello
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" ../
make -j8 install
Compiling…
Compiled successfully, but installation failed with:
CMake Error at cmake_install.cmake:90 (file):
file INSTALL cannot copy file
"/home/morgan/programs/code-gmic/build/gmic_gimp" to
"/usr/lib/gimp/2.0/plug-ins/gmic_gimp".
The user should be able to install to a custom folder if system-wide installation is not desired, for example because the user is compiling in a sandbox, or because the user wants to install this for a GIMP git bleeding-edge build which is confined to its own folder so as not to conflict with the GIMP stable build installed system-wide by the package manager.
CMAKE_INSTALL_PREFIX enables that, but it doesn’t seem to be implemented for the GIMP plugin.
I’ll look into that, it’s definitely a mistake and should be easy enough to fix…
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…
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
Thanks Andrea, the request has been accepted and is now a part of the official repo.
@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.
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
@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
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.