From 4adfeab3e6af3ab27ea20bd11a27574120fc71a2 Mon Sep 17 00:00:00 2001
From: Andre Sailer <andre.philippe.sailer@cern.ch>
Date: Mon, 28 Oct 2019 17:47:47 +0100
Subject: [PATCH] InitAClick: fix of separation and -I for include dirs

---
 DDG4/examples/initAClick.C         | 2 +-
 examples/LHeD/scripts/initAClick.C | 8 +++++++-
 2 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/DDG4/examples/initAClick.C b/DDG4/examples/initAClick.C
index f7efad091..a52b6d816 100644
--- a/DDG4/examples/initAClick.C
+++ b/DDG4/examples/initAClick.C
@@ -62,7 +62,7 @@ int initAClick(const char* command=0)  {
   std::string clhep   = make_str(gSystem->Getenv("CLHEP_ROOT_DIR"));
   std::string defs    = "";
   std::string libs    = " -L"+rootsys+"/lib";
-  std::string inc     = " -I"+dd4hep+"/examples/DDG4/examples -I"+dd4hep + " -I"+dd4hep+"/include";
+  std::string inc     = " -I"+dd4hep+"/examples/DDG4/examples -I"+dd4hep + " -I"+dd4hep+"/include ";
   std::string ext = "so";
   if ( !geant4.empty() )  {
     inc  += " -I"+geant4+"/include/Geant4";
diff --git a/examples/LHeD/scripts/initAClick.C b/examples/LHeD/scripts/initAClick.C
index b0495e11c..a441f5cb0 100644
--- a/examples/LHeD/scripts/initAClick.C
+++ b/examples/LHeD/scripts/initAClick.C
@@ -62,7 +62,13 @@ int initAClick(const char* command=0)  {
   std::string clhep   = make_str(gSystem->Getenv("CLHEP_ROOT_DIR"));
   std::string defs    = "";
   std::string libs    = " -L"+rootsys+"/lib";
-  std::string inc     = " -I"+dd4hep+"/examples/LHeD/scripts -I"+dd4hep + " -I"+dd4hep+"/include"+clhep+"/include -I"+geant4+"/include";
+  std::string inc     = "";
+  inc += " -I" + dd4hep + "/examples/LHeD/scripts ";
+  inc += " -I" + dd4hep;
+  inc += " -I" + dd4hep + "/include ";
+  inc += " -I" + clhep  + "/include ";
+  inc += " -I" + geant4 + "/include ";
+
   std::string ext = "so";
   if ( !geant4.empty() )  {
     inc  += " -I"+geant4+"/include/Geant4";
-- 
GitLab