[vala/mickey/wip/posix-profile: 1/2] codegen: (POSIX profile) fix compiling when we have no pkg-config package



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

    codegen: (POSIX profile) fix compiling when we have no pkg-config package

 codegen/valaccodecompiler.vala |    9 ++++++---
 1 files changed, 6 insertions(+), 3 deletions(-)
---
diff --git a/codegen/valaccodecompiler.vala b/codegen/valaccodecompiler.vala
index 4e1390c..4f7744f 100644
--- a/codegen/valaccodecompiler.vala
+++ b/codegen/valaccodecompiler.vala
@@ -45,9 +45,12 @@ 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;
+                       }
                }
 
                // TODO compile the C code files in parallel


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