Commit Graph

122 Commits

Author SHA1 Message Date
Sébastien Fourey 56908beed2 Use -O3 instead of -Ofast (CMakeLists.txt) 2023-07-11 16:24:02 +02:00
Sébastien Fourey 99971e9b7f Define and use _IS_UNIX_ instead of _IS_LINUX_ for non-MacOS Unixes 2023-05-02 15:20:06 +02:00
Lily Foster 420e85e005
Do not build all host code by default
This is problematic because some host code, like 8bf, require Qt6 and
that prevents building other host code with Qt5 at all.
2023-03-17 14:37:08 -04:00
Lily Foster 017e716dcc
Fix Qt form paths in CMakeLists 2023-03-17 14:14:23 -04:00
Sébastien Fourey eb5e2ad490 Add filter definition binary cache 2023-03-14 15:00:53 +01:00
L. E. Segovia e8d7a35237 CMake: actually fix ENABLE_SYSTEM_GMIC
PR c-koi/gmic-qt#172 is correct in that it is no longer possible
to build without -Dgmic_core, due to G'MIC-Qt relying in
now-private implementation details of G'MIC; namely, the extensions
made in gmic.cpp to CImg.

However, the solution chosen has significant shortcomings:

1. It blindly assumes that the consumed library has been built by a
  GCC-compatible compiler. This is easily inferred from the lack of
  symbol exports in {CImg,gmic}.{h,cpp}.
2. It makes no provision for the exported library type; G'MIC can be
  built statically or dynamically.
3. In Windows, when built with MSVC, the kind of symbol export that
  gmic_core implies is only available with a static libgmic.

To fix this, this commit augments G'MIC-Qt's `ENABLE_DYNAMIC_LINKING`
handling with target detection code for the above described cases.
In the case where a compatible library is not found, a fallback is
specified that will build libgmic as a separate target, then make
G'MIC-Qt link against it in order to mimic the requirements. If a
suitable system library is found, we augment it with the gmic.cpp
plugin to make the symbols visible at compile time.
2023-02-20 18:31:52 -03:00
Ștefan Talpalaru f0d9d8acd1
CMake: fix ENABLE_SYSTEM_GMIC
It is no longer possible to build without "-Dgmic_core", so we enable it
unconditionally.
2023-02-05 18:59:18 +01:00
Sebastien Fourey 65a0e9493d Remove Krita host specific code 2022-11-21 16:03:33 +01:00
Nicholas Hayes e0d5304630 Add color management for the G'MIC-Qt preview
This improves the appearance of the preview image for all image modes.
Color management will only be used if the 8bf plug-in host provides the
image color profile to its 8bf plug-ins.

G'MIC-Qt will attempt to retrieve the color profile for the display
that G'MIC-Qt is using when the first call to applyColorProfile is
made, if that is unsuccessful the color profile of the primary display
will be used.
The display color profile will not be refreshed if the user moves the
G'MIC-Qt UI to a different display within the same session.

Depending on the image, the 32-bit float mode may still have color
differences versus Photoshop's native rendering.
I am not sure if my code is missing a step in the color correction
process, or if it is a difference in behavior between Little CMS and
Adobe's color management engine.
2022-10-29 00:48:16 -06:00
Marcus Rückert d7cb84a3f0 Enable building with system libgmic
Co-authored-by: Antonio Rojas <arojas@archlinux.org>
2022-06-28 22:02:47 +00:00
Andreas Schneider 1f915a9014 cmake: Build with system gmic 2022-06-28 22:02:41 +00:00
Sebastien Fourey deb306d4f9 Add persistent memory support for gmic instances on a single filter 2022-06-15 16:11:58 +02:00
L. E. Segovia bf6666218a Support LTO via CMake 3.10+ 2022-05-30 21:02:21 +00:00
L. E. Segovia c574c7c66d Support MSVC's OpenMP 2.0 2022-05-30 21:02:21 +00:00
L. E. Segovia 90f51bf4ac Sync up the stack size with the G'MIC Makefile 2022-05-30 21:02:21 +00:00
Sebastien Fourey 3e51329c08 Build .qm files from .ts or .csv ones when running cmake 2022-05-25 16:43:31 +02:00
Sebastien Fourey ba428215f0 Update translations in .pro and CMakeLists.txt 2022-05-24 14:06:06 +02:00
Sebastien Fourey d824a99d2a Extract a proper Settings class from the DialogSettings 2022-05-20 13:43:01 +02:00
Sebastien Fourey 2539fb4de6 Fix typo 2022-03-29 16:04:43 +02:00
David Tschumperle d7cc0fcd20 Disable 'lto' by default (caused issues with libgmic). 2022-01-15 13:31:09 +01:00
David Tschumperle 268fc3ecd6 . 2022-01-15 13:26:30 +01:00
David Tschumperlé 85b350411f Enable G'MIC community filters by default, when compiling plug-in with 'cmake'. 2021-12-21 15:44:02 +01:00
L. E. Segovia fbca1eaaad Fix FFTW3 usage
- Make FFTW3 truly optional
- Do not duplicate FFTW3 Threads lookup
- Properly detect and use FFTW3 threads
2021-12-07 11:52:44 -03:00
L. E. Segovia f3ba017ef2 Add Android support 2021-12-07 11:52:32 -03:00
L. E. Segovia 6e88b9f400 Add support for MSVC 2021-12-07 11:51:21 -03:00
Sebastien Fourey cd9890fde0 Check for 'gmic_stdlib_community.h' file rather than 'gmic_stdlib.h' [CMake] 2021-11-12 15:28:15 +01:00
Sebastien Fourey 7b70143523 Add a tag type, tag2filters map, and a tag selector menu 2021-09-16 18:18:12 +02:00
Sebastien Fourey d8ae746b80 Rename plugin API headers (host.h->GmicQtHost.h, gmic_qt.h->GmicQt.h) 2021-05-31 16:23:49 +02:00
Sebastien Fourey d0b201b09a Move host-dedicated functions to gmic_qt.h 2021-05-28 17:09:15 +02:00
Sebastien Fourey 510f47d86e Update CMakeLists.txt (new form) 2021-05-22 18:06:41 +02:00
Sebastien Fourey e3585339ee Introduce new API (wip) 2021-04-27 09:00:53 +02:00
Jan Tojnar 401e2b3d2a
cmake: Simplify GIMP linking
I avoided the cleaner solution using IMPORTED_TARGET since it is only available in CMake 3.6+ and we were targeting 3.1. But it turns out target_link_directories used in the verbose solution requires even newer CMake 3.13.
2021-03-24 21:42:45 +01:00
Sébastien Fourey 48e18cd985
Merge pull request #104 from jtojnar/gimp-3
gimp: Add experimental support for GIMP 3
2021-03-24 19:45:10 +01:00
Sebastien Fourey f173677eab Disable preview updates while spinboxes are edited using keyboard 2021-03-19 19:41:17 +01:00
Jan Tojnar 0cd224e6aa
gimp: Add experimental support for GIMP 3 2021-03-16 07:14:18 +01:00
Jan Tojnar 71926d3535
cmake: Install GIMP plug-in to a subdirectory
This will be necessary with GIMP 3:

58b98b941f
2021-03-16 03:45:50 +01:00
Jan Tojnar 585ef8769c
cmake: Simplify GIMP detection
Ideally, we would use IMPORTED_TARGET but that requires CMake 3.6.
2021-03-16 03:43:39 +01:00
Sebastien Fourey e627c9c242 Revert "Remove Krita host"
This reverts commit 2fa88da0dc.
2021-02-03 13:38:40 +01:00
Sebastien Fourey 2fa88da0dc Remove Krita host 2021-02-03 11:36:33 +01:00
Sebastien Fourey 3566560978 Remove digiKam host 2021-01-29 18:55:57 +01:00
Sebastien Fourey 99587dbb18 Use ASCII strings as layer names (Gimp host/Windows) 2021-01-25 22:14:07 +01:00
Nicholas Hayes b1a2e8e001 Add the 8bf filter plug-in host 2020-12-08 17:53:59 -07:00
Jehan 6e7f6ac5bc CMakeLists: don't hardcode pkg-config and don't use gimptool anymore.
Hardcoding `pkg-config` will work only for native builds. If you want to
cross-compile, you need to search for the appropriate tools, which is
what FindPkgConfig module does. Then you can use PKG_CONFIG_EXECUTABLE
variable which will be set according to your toolchain rules.

Also old-style binary config tools, such as gimptool, are not a good
idea as they are not very cross-compilation friendly (to do it right, we
would have to generate variants per (host, target) couple). Instead
pkg-config is the right process as it works well without having to run
non-native binaries. I am actually considering removing gimptool from
GIMP eventually (and document the generic pkg-config process instead).

Running `gimptool-2.0 --libs-noui` and `--cflags-noui` is the
equivalent to run `pkg-config --libs` (`--cflags` respectively) on
`gimp-2.0`. So let's just replace by these commands.
2020-09-30 00:02:39 +02:00
Sebastien Fourey c8d7b52f3b Fix CMakeLists (filters' translations) 2020-09-28 14:48:35 +02:00
Sebastien Fourey a73c3ea1ce Add support for translation of filter parameters text 2020-09-21 12:08:11 +02:00
Sebastien Fourey 0bc04c1c45 [API] Allow host application to customize input, ouput, and preview modes 2020-05-28 19:14:21 +02:00
Sebastien Fourey c4b4856d30 Fix fftw3 linking 2020-05-28 09:05:07 +02:00
Sebastien Fourey b607a76784 Support digiKam 7.0.0 2020-05-28 09:03:03 +02:00
Sebastien Fourey 1f4b74ea15 Fix gimp host application name (CMakeLists.txt) 2020-04-14 09:07:45 +02:00
Sebastien Fourey af4991a95b Disable LTO in debug mode (qmake/cmake) 2020-03-19 09:30:02 +01:00