meson: Use the new `pic` argument on static libs
authorThibault Saunier <thibault.saunier@osg.samsung.com>
Thu, 20 Oct 2016 18:38:46 +0000 (15:38 -0300)
committerThibault Saunier <thibault.saunier@osg.samsung.com>
Thu, 20 Oct 2016 19:04:42 +0000 (16:04 -0300)
We depend on meson 0.35 which makes it simpler to handle

Removes a meson warning

gst/printf/meson.build
libs/gst/check/libcheck/meson.build
meson.build

index 2a867a6..1b42d2a 100644 (file)
@@ -74,6 +74,7 @@ endif
 printf_lib = static_library('gstprintf',
     printf_sources,
     include_directories : [configinc],
-    c_args : printf_args + pic_args,
+    c_args : printf_args,
     install : false,
+    pic: true,
     dependencies : [glib_dep])
index 4f9a92b..f86c187 100644 (file)
@@ -38,4 +38,5 @@ libcheck = static_library('check',
   libcheck_files,
   include_directories : [ configinc, internal_check_h_inc ],
   dependencies : [rt_lib, mathlib],
-  c_args: gst_c_args + pic_args)
+  c_args: gst_c_args,
+  pic: true)
index 6fe6fa8..c5edeae 100644 (file)
@@ -29,14 +29,6 @@ helpers_install_dir = libexecdir + '/gstreamer-1.0/'
 
 cc = meson.get_compiler('c')
 
-# FIXME: Meson should have a way for portably adding -fPIC when needed for use
-# with static libraries that are linked into shared libraries. Or, it should
-# add it by default with an option to turn it off if needed.
-pic_args = ['-fPIC']
-if host_machine.system() == 'windows'
-  pic_args = []
-endif
-
 # Ignore several spurious warnings for things gstreamer does very commonly
 # If a warning is completely useless and spammy, use '/wdXXXX' to suppress it
 # If a warning is harmless but hard to fix, use '/woXXXX' so it's shown once