[babl] meson build: add missing sse2 compiler flags to babl library build



commit e75a27b5346f4c8480180479b7524b1b20ed8321
Author: John Marshall <jtm home gmail com>
Date:   Fri May 3 09:56:35 2019 +0100

    meson build: add missing sse2 compiler flags to babl library build

 babl/meson.build | 9 ++++++---
 meson.build      | 9 ++++++---
 2 files changed, 12 insertions(+), 6 deletions(-)
---
diff --git a/babl/meson.build b/babl/meson.build
index 240493c..0510ebd 100644
--- a/babl/meson.build
+++ b/babl/meson.build
@@ -15,6 +15,11 @@ version_script_target = custom_target(version_script,
   capture: true,
 )
 
+# c compiler arguments
+babl_c_args = [
+  sse2_cflags,
+  '-DLIBDIR="@0@"'.format(babl_libdir),
+]
 
 # Linker arguments
 babl_link_args = [
@@ -121,13 +126,11 @@ install_headers(babl_headers,
   subdir: join_paths(lib_name, 'babl')
 )
 
-
 babl = library(
   lib_name,
   babl_sources,
   include_directories: [ rootInclude, bablBaseInclude],
-  c_args:   [ '-DLIBDIR="' + join_paths(get_option('prefix'), get_option('libdir')) + '"', ],
-  cpp_args: [ '-DLIBDIR="' + join_paths(get_option('prefix'), get_option('libdir')) + '"', ],
+  c_args: babl_c_args,
   link_whole: [ babl_base, ],
   link_args: [ babl_link_args, ],
   dependencies: [ math, thread, dl, lcms, ],
diff --git a/meson.build b/meson.build
index 89c733a..e5ea943 100644
--- a/meson.build
+++ b/meson.build
@@ -31,6 +31,9 @@ cc        = meson.get_compiler('c')
 prefix    = get_option('prefix')
 buildtype = get_option('buildtype')
 
+babl_prefix = get_option('prefix')
+babl_libdir = join_paths(babl_prefix, get_option('libdir'))
+
 ################################################################################
 # Projects infos
 
@@ -283,7 +286,7 @@ endif
 
 # LCMS
 if get_option('with-lcms')
-  lcms = dependency('lcms2', required : true)
+  lcms = dependency('lcms2', required: true, native: false)
   if lcms.found()
     conf.set('HAVE_LCMS', 1, description: 
       'Define to 1 if liblcms2 is available')
@@ -322,7 +325,7 @@ w3m_bin = find_program('w3m', required: false, native: true)
 build_docs = false
 
 if get_option('with-docs')
-  if cc_can_run and env_bin.found() and not build_platform_win32
+  if cc_can_run and env_bin.found() and not platform_win32
     build_docs = true
   else
     warning('Unable to generate docs in this environment')
@@ -372,7 +375,7 @@ endif
 if w3m_bin.found() and build_docs
   custom_target('README',
     input: index_html,
-    output: [ 'README' ] ,
+    output: 'README',
     command: [
       w3m_bin,
       '-cols', '72',


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