[gtk/wip/otte/colorspace: 34/50] cms: Add lcms to the build




commit ab4837d3117b781625f685b1c7bcd9473f67b950
Author: Benjamin Otte <otte redhat com>
Date:   Mon Sep 20 09:24:27 2021 +0200

    cms: Add lcms to the build
    
    Since lcms2 is using autotools, this uses the
    experimental 'external project' module of meson,
    and adds a minimal meson.build file to lcms2.
    
    It seems to work.

 gdk/meson.build                            |  1 +
 meson.build                                |  3 +++
 subprojects/lcms2.wrap                     |  6 ++++++
 subprojects/packagefiles/lcms2/meson.build | 14 ++++++++++++++
 4 files changed, 24 insertions(+)
---
diff --git a/gdk/meson.build b/gdk/meson.build
index f40d1d3b5b..98f481ff57 100644
--- a/gdk/meson.build
+++ b/gdk/meson.build
@@ -207,6 +207,7 @@ gdk_deps = [
   fontconfig_dep,
   platform_gio_dep,
   pangocairo_dep,
+  lcms2_dep,
   vulkan_dep,
   png_dep,
   tiff_dep,
diff --git a/meson.build b/meson.build
index 02a2786c5c..a9acb8bd49 100644
--- a/meson.build
+++ b/meson.build
@@ -16,6 +16,7 @@ fribidi_req        = '>= 0.19.7'
 cairo_req          = '>= 1.14.0'
 gdk_pixbuf_req     = '>= 2.30.0'
 introspection_req  = '>= 1.39.0'
+lcms2_req          = '>= 2.8'
 wayland_proto_req  = '>= 1.21'
 wayland_req        = '>= 1.16.91'
 graphene_req       = '>= 1.9.1'
@@ -379,6 +380,8 @@ pango_dep      = dependency('pango', version: pango_req,
                             fallback : ['pango', 'libpango_dep'])
 fribidi_dep    = dependency('fribidi', version: fribidi_req,
                             fallback : ['fribidi', 'libfribidi_dep'])
+lcms2_dep      = dependency('lcms2', version: lcms2_req,
+                            fallback : ['lcms2', 'liblcms2_dep'])
 
 # Require PangoFT2 if on X11 or wayland
 require_pangoft2 = wayland_enabled or x11_enabled
diff --git a/subprojects/lcms2.wrap b/subprojects/lcms2.wrap
new file mode 100644
index 0000000000..6c81dd34eb
--- /dev/null
+++ b/subprojects/lcms2.wrap
@@ -0,0 +1,6 @@
+[wrap-git]
+directory=lcms2
+url=https://github.com/mm2/Little-CMS.git
+revision=master
+patch_directory=lcms2
+depth=1
diff --git a/subprojects/packagefiles/lcms2/meson.build b/subprojects/packagefiles/lcms2/meson.build
new file mode 100644
index 0000000000..ef8f6e27a1
--- /dev/null
+++ b/subprojects/packagefiles/lcms2/meson.build
@@ -0,0 +1,14 @@
+project('lcms2', 'c',
+  version : '2.12',
+  meson_version : '>=0.56.0',
+)
+
+mod = import('unstable_external_project')
+
+p = mod.add_project('configure',
+  configure_options : ['--prefix=@PREFIX@',
+                       '--libdir=@PREFIX@/@LIBDIR@',
+                      ],
+)
+
+liblcms2_dep = p.dependency('lcms2')


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]