lib/serialization: add README.md
[nit.git] / src / ffi / pkgconfig.nit
index 335d8d1..bd62de3 100644 (file)
@@ -67,7 +67,7 @@ class PkgconfigPhase
                end
 
                # check availability of pkg-config
-               var proc_which = new IProcess("which", "pkg-config")
+               var proc_which = new ProcessReader("which", "pkg-config")
                proc_which.wait
                var status = proc_which.status
                if status != 0 then
@@ -87,15 +87,7 @@ class PkgconfigPhase
                                return
                        end
 
-                       # compiler
-                       var proc = new IProcess("pkg-config", "--cflags", pkg)
-                       var compiler_opts = proc.read_all
-                       mmodule.c_compiler_options = "{mmodule.c_compiler_options} {compiler_opts.replace("\n", " ")}"
-
-                       # linker
-                       proc = new IProcess("pkg-config", "--libs", pkg)
-                       var linker_opts = proc.read_all
-                       mmodule.c_linker_options = "{mmodule.c_linker_options} {linker_opts.replace("\n", " ")}"
+                       mmodule.pkgconfigs.add pkg
                end
 
        end