meson: Add with-lcms option
authorJán Veselý <jano.vesely@gmail.com>
Thu, 6 Dec 2018 20:34:51 +0000 (15:34 -0500)
committerJan Vesely <jan.vesely@rutgers.edu>
Thu, 6 Dec 2018 20:50:10 +0000 (15:50 -0500)
Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
babl/meson.build
meson.build
meson_options.txt

index 77e69a5dce0d1c34c4fdcdce0594f52bffcc6341..240493c6ea3b8ed10fb254312418f8c7e5854c0c 100644 (file)
@@ -130,7 +130,7 @@ babl = library(
   cpp_args: [ '-DLIBDIR="' + join_paths(get_option('prefix'), get_option('libdir')) + '"', ],
   link_whole: [ babl_base, ],
   link_args: [ babl_link_args, ],
-  dependencies: [ math, thread, dl, ],
+  dependencies: [ math, thread, dl, lcms, ],
   link_depends: [ version_script_target, ],
   version: so_version,
   install: true,
index 57a2b9b5a51b727853e21840737289737f8159a7..f617f158c440f87f643a7d012cd85c1c6f1b42c4 100644 (file)
@@ -267,6 +267,15 @@ endif
 ################################################################################
 # Dependencies
 
+# LCMS
+with_lcms = get_option('with-lcms')
+if with_lcms
+  lcms = cc.find_library('lcms2', required : true)
+  if lcms.found()
+    conf.set('HAVE_LCMS', 1, description: 'Define to 1 if liblcms2 is available')
+  endif
+endif
+
 math = cc.find_library('m',   required: false)
 log  = cc.find_library('log', required: false)
 if platform_win32 
index b2dcc54591aa10649685779acd346c9faa786c35..ab08ce90e81e9d4e021ec46999f6ebee18b5c846 100644 (file)
@@ -5,3 +5,4 @@ option('enable-sse3',   type: 'boolean', value: true, description: 'enable SSE3
 option('enable-sse4_1', type: 'boolean', value: true, description: 'enable SSE4.1 support')
 option('enable-f16c',   type: 'boolean', value: true, description: 'enable hardware half-float support')
 option('with-docs',     type: 'boolean', value: true, description: 'build website')
+option('with-lcms',     type: 'boolean', value: true, description: 'build with lcms')