[vala/wip/profile-posix: 24/28] codegen: Fix compiling without pkg-config package (POSIX)



commit ae33d1dc43f1289d2ba68a8f45b1ba1e4062dabc
Author: Dr. Michael Lauer <mickey vanille-media de>
Date:   Fri Mar 16 15:09:51 2018 +0100

    codegen: Fix compiling without pkg-config package (POSIX)

 codegen/valaccodecompiler.vala |   11 ++++++++---
 1 files changed, 8 insertions(+), 3 deletions(-)
---
diff --git a/codegen/valaccodecompiler.vala b/codegen/valaccodecompiler.vala
index 4e1390c..76549c9 100644
--- a/codegen/valaccodecompiler.vala
+++ b/codegen/valaccodecompiler.vala
@@ -45,9 +45,14 @@ public class Vala.CCodeCompiler {
                                pc += " " + pkg;
                        }
                }
-               string? pkgflags = context.pkg_config_compile_flags (pc);
-               if (pkgflags == null) {
-                       return;
+               string? pkgflags;
+               if (pc.length > 0) {
+                       pkgflags = context.pkg_config_compile_flags (pc);
+                       if (pkgflags == null) {
+                               return;
+                       }
+               } else {
+                       pkgflags = "";
                }
 
                // TODO compile the C code files in parallel


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