the version in the github gist provides cmake switches for all the Gentoo use flags. The switches are activated by default, but the corresponding packages are not required, only enabled if detected
I am testing the CMakeLists.txt with my GIMP AppImage builds, and so far I have not found any issues
the CMakeLists.txt was not tested so far under OSX or Windows
I am ready to provide support and maintenance for it. In fact, the CMakeLists.txt is rather simple and I do not expect too much maintenance needed once it is working…
as to wether to merge it upstream , I let @David_Tschumperle to decide what to do.
In any case, some testing with the Gentoo emerge system would be definitely interesting!
I gave a try today and unfortunately, this didn’t work for me.
It’s probably my fault. I’ve tested putting the build folder both in the gmic/ and gmic/src/ folder, and got different error messages for these two cases.
As I’m not sure I did the things right, I’ll probably test again before complaining too much
put the CMakeLists.txt file in the top gmic/ folder
mkdir build; cd build
cmake [options] .. && make && make install
What I forgot to mention is that the current cmake build system only works with official releases, not with git clones… this is the next thing I need to work on, probably with some help from David.
Ok, here comes my first question concerning how to build from git sources: the gmic target depends on gmic_stdlib.h header, which in turn requires gmic in order to be generated… how do I get out of this apparently circular dependency?
shows that gmic is not necessary to retrieve file gmic_stdlib.h.
Makefile entry stdlib: indeed generates this file too (and upload it on the G’MIC server if possible), but this is not an entry you should call by yourself (I do ).
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.