Closed amyspark closed 2 years ago
oh i was planning to refresh my PR over the weekend. thank you for doing it :)
We don't really get what is your goal with this PR.
Could you explain it.
In what it is different from compiling with GMIC_DYNAMIC_LINKING=on
?
In what it is different from compiling with GMIC_DYNAMIC_LINKING=on ?
That's only available in the qmake toolchain, and is Linux only. Also cc @antonio-rojas and @darix for more context.
That's only available in the qmake toolchain, and is Linux only. Also cc @antonio-rojas and @darix for more context.
Well, but why having to change all these files to make it work for other platforms than Linux? In particular, I don't see the point with:
#ifndef gmic_core
#include "CImg.h"
#endif
#include "gmic.h"
that appears in most .cpp
files.
I see you want to remove the definition of gmic_core
when compiling, so that's probably the reason why all these extra "CImg.h" includes are necessary.
But why trying to remove gmic_core
? What problem does it solve?
Ha I guess, that's because you don't want gmic.h
depends on gmic.cpp
...
@c-koi , maybe we can wait for @amyspark 's answer, but if so, the PR seems correct to me.
It allows G'MIC-Qt to be compiled in GMIC_DYNAMIC_LINKING=on
mode without requiring a dependency to gmic.cpp
, which is nice.
The change to be made in the gmic-qt.pro
file should be only to undefine gmic_core
when GMIC_DYNAMIC_LINKING=on
(as you did on ZArt a few days ago).
The krita5 gmic plugin links against libgmic, We want to build with the header files and library provided by a gmic package and not do a in-source build in the gmic sources.
Krita forked gmic-qt for their integration into krita. Due to the way gmic-qt was built it included the gmic.cpp file and as such it was recompiled over and over. in an ideal world a distro builds one gmic package. and gmic-qt is a separate package that links against the gmic-devel package.
And then building krita's gmic integration becomes very simple without n compiled copies of gmic.cpp on a system.
This discussion is related to this PR. You accepted all the needed fixes for this in gmic itself. just the cleanup of the gmic-qt side is still pending. https://discuss.pixls.us/t/revive-an-old-issue-allow-gmic-qt-to-link-the-shared-libgmic/28448
I understand. It looks good to me. @c-koi , I suggest this PR gets merged.
:wave:
This PR upstreams the patches enabling building Krita's G'MIC-Qt using system libgmic and CImg. These were provided originally by @darix and @cryptomilk, with a recent bugfix by @antonio-rojas for G'MIC-Qt 3.1.4.
The attached commits are extensions of the below PRs, which will be closed as completed.
Closes #134 Closes #81
cc @dtschump @c-koi