meson build: add missing sse2 compiler flags to babl library build
authorJohn Marshall <jtm.home@gmail.com>
Fri, 3 May 2019 08:56:35 +0000 (09:56 +0100)
committerØyvind Kolås <pippin@gimp.org>
Sat, 25 May 2019 16:13:31 +0000 (18:13 +0200)
babl/meson.build
meson.build

index 240493c6ea3b8ed10fb254312418f8c7e5854c0c..0510ebd1905cd3953a24e54c8326d85007373392 100644 (file)
@@ -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, ],
index 89c733a16790200c1171d3ce6142edb51b1314da..e5ea943a5b6e01df9bbe4977b554ba3f67708c68 100644 (file)
@@ -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',