-
-
Notifications
You must be signed in to change notification settings - Fork 53
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
gimp: Add experimental support for GIMP 3 #104
Conversation
Ideally, we would use IMPORTED_TARGET but that requires CMake 3.6.
This will be necessary with GIMP 3: https://gitlab.gnome.org/GNOME/gimp/-/commit/58b98b941ffc3a05bcb8c9ff6f2cb3ce6b846d4a
Confirmed it builds and works with both GIMP 2.10.22 and 2.99.5 ( |
@c-koi Any chance of getting this in in? |
Yes, we are definitely interested by this. |
I now tested several more random filters and all input settings and all output settings and everything seems to work fine. But it would still be nice to get someone familiar with GMic test it or tell me if there is something specific I should check. |
I'd be happy to test. Do you know if there is any "easy" way to install GIMP 3 (on Ubuntu 20.04), or do I have to compile it by myself from scratch ? |
It can be installed through flatpak: https://www.gimp.org/downloads/devel/ Not sure if it can be used for building plug-ins though. Alternately, you can use Nix package manager. For example, running |
Trying the |
Nevermind, found it! |
OK, some after a few tests, I can say it looks really cool and stable. |
Thanks! |
I wanted to avoid the cleaner solution using Unfortunately, Ubuntu Xenial (16.04 LTS) on CI only has CMake 3.5 so we can either revert 585ef87, or switch CI to Ubuntu Bionic (18.04 LTS), which has CMake 3.10 and use the simplified linking: --- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -2,7 +2,7 @@ project(gmic-qt)
message(STATUS "Using CMake version: ${CMAKE_VERSION}")
-cmake_minimum_required(VERSION 3.1.0 FATAL_ERROR)
+cmake_minimum_required(VERSION 3.6.0 FATAL_ERROR)
LIST (APPEND CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake/modules")
include(FeatureSummary)
include(FindPkgConfig)
@@ -525,19 +525,17 @@ if (${GMIC_QT_HOST} STREQUAL "gimp" OR ${GMIC_QT_HOST} STREQUAL "gimp3")
endif()
find_package(PkgConfig REQUIRED)
- pkg_check_modules(GIMP REQUIRED gimp-${TARGET_GIMP_VERSION}.0)
+ pkg_check_modules(GIMP REQUIRED gimp-${TARGET_GIMP_VERSION}.0 IMPORTED_TARGET)
# CMake does not support passing --define-variable through pkg_get_variable.
execute_process(COMMAND ${PKG_CONFIG_EXECUTABLE} gimp-${TARGET_GIMP_VERSION}.0 --define-variable=prefix=${CMAKE_INSTALL_PREFIX} --variable gimplibdir OUTPUT_VARIABLE GIMP_PKGLIBDIR OUTPUT_STRIP_TRAILING_WHITESPACE)
set (gmic_qt_SRCS ${gmic_qt_SRCS} src/Host/Gimp/host_gimp.cpp)
add_definitions(-DGMIC_HOST=gimp -DGIMP_DISABLE_DEPRECATED)
add_executable(gmic_gimp_qt ${gmic_qt_SRCS} ${gmic_qt_QRC} ${qmic_qt_QM})
- target_include_directories(gmic_gimp_qt PRIVATE ${GIMP_INCLUDE_DIRS})
- target_link_directories(gmic_gimp_qt PRIVATE ${GIMP_LIBRARY_DIRS})
target_link_libraries(
gmic_gimp_qt
PRIVATE
- ${GIMP_LIBRARIES}
+ PkgConfig::GIMP
${gmic_qt_LIBRARIES}
)
install(TARGETS gmic_gimp_qt RUNTIME DESTINATION "${GIMP_PKGLIBDIR}/plug-ins/gmic_gimp_qt") It should not be much of a problem since Xenial has EOL in April. |
|
Okay, opened #106 to fix the CI. |
As someone just trying this out now (via patching the AUR gimp-plugin-gmic-git package to use the directory /usr/lib/gimp/2.99/plug-ins/gmic_gimp_qt/ instead of /usr/lib/gimp/2.0/plug-ins/, and to pass HOST=gimp3 instead of HOST=gimp), I was confused to find this failing to link, with ApplicationName and ApplicationShortname undefined. Turned out the reason for that was I was using the QMake build process, but this PR only covered building with CMake. Dunno if that’s significant or not, or if one is on the way out in favour of the other, but I figured I’d at least mention it here so it’s recorded. (Subsequent to that I got compiler errors on |
The latest GIMP version updates the plug-in API:
https://www.gimp.org/news/2021/05/08/gimp-2-99-6-released/
That is likely responsible for the build failures.
I did not bother with qmake since it has been a PITA IME.
|
Fixes: #90