$NetBSD: patch-plugins_gdk-pixbuf_CMakeLists.txt,v 1.3 2025/02/04 11:22:48 wiz Exp $ * adapt to make gdk-pixbuf plugin a separate package --- plugins/gdk-pixbuf/CMakeLists.txt.orig 2024-01-05 13:15:08.412618939 +0000 +++ plugins/gdk-pixbuf/CMakeLists.txt @@ -2,9 +2,13 @@ # # Use of this source code is governed by a BSD-style # license that can be found in the LICENSE file. +cmake_minimum_required(VERSION 3.10) +project(gdl-pixbuf-jxl LANGUAGES C CXX) find_package(PkgConfig) pkg_check_modules(Gdk-Pixbuf IMPORTED_TARGET gdk-pixbuf-2.0>=2.36) +pkg_check_modules(JXL IMPORTED_TARGET libjxl libjxl_threads) +pkg_check_modules(LCMS2 IMPORTED_TARGET lcms2) include(GNUInstallDirs) @@ -25,7 +29,7 @@ set_target_properties(pixbufloader-jxl P # Note: This only needs the decoder library, but we don't install the decoder # shared library. -target_link_libraries(pixbufloader-jxl jxl jxl_threads lcms2 PkgConfig::Gdk-Pixbuf) +target_link_libraries(pixbufloader-jxl PkgConfig::JXL PkgConfig::LCMS2 PkgConfig::Gdk-Pixbuf) execute_process(COMMAND ${PKG_CONFIG_EXECUTABLE} gdk-pixbuf-2.0 --variable gdk_pixbuf_moduledir --define-variable=prefix=${CMAKE_INSTALL_PREFIX} OUTPUT_VARIABLE GDK_PIXBUF_MODULEDIR OUTPUT_STRIP_TRAILING_WHITESPACE) install(TARGETS pixbufloader-jxl DESTINATION "${GDK_PIXBUF_MODULEDIR}")