diff --git a/cmake/thisdd4hep.sh b/cmake/thisdd4hep.sh
index e8dca65a9d0a3f5fa5c5074fe2ea3acbac93da19..43a3a7f9cb0585dfa83683732aea21fca38e978b 100644
--- a/cmake/thisdd4hep.sh
+++ b/cmake/thisdd4hep.sh
@@ -11,13 +11,14 @@
 #-----------------------------------------------------------------------------
 dd4hep_parse_this()   {
     SOURCE=${1}
+    package=${2};
     if [ "x${SOURCE}" = "x" ]; then
-        if [ -f bin/thisdd4hep.sh ]; then
+        if [ -f bin/this${package}.sh ]; then
             THIS="$PWD"; export THIS
-        elif [ -f ./thisdd4hep.sh ]; then
+        elif [ -f ./this${package}.sh ]; then
             THIS=$(cd ..  > /dev/null; pwd); export THIS
         else
-            echo ERROR: must "cd where/dd4hep/is" before calling ". bin/thisdd4hep.sh" for this version of bash!
+            echo ERROR: must "cd where/${package}/is" before calling ". bin/this${package}.sh" for this version of bash!
             THIS=; export THIS
             return 1
         fi
@@ -69,7 +70,7 @@ if [ "x$SOURCE" = "x" ]; then
     SOURCE=${(%):-%N} # for zsh
 fi
 
-dd4hep_parse_this $SOURCE;
+dd4hep_parse_this $SOURCE  @PackageName@;
 #
 # These 3 are the main configuration variables: ROOT, Geant4 and XercesC
 # --> LCIO & Co. are handled elsewhere!
diff --git a/cmake/thisdd4hep_package.sh.in b/cmake/thisdd4hep_package.sh.in
index 4e2ddead502b028aa811b04dcb2613ca15a7328c..86385d81bb4bfd2a7f89abdda3bd9cf98b0a97ae 100644
--- a/cmake/thisdd4hep_package.sh.in
+++ b/cmake/thisdd4hep_package.sh.in
@@ -21,7 +21,7 @@ if [ "x$SOURCE" = "x" ]; then
     SOURCE=${(%):-%N} # for zsh
 fi
 
-dd4hep_parse_this $SOURCE;
+dd4hep_parse_this $SOURCE  @PackageName@;
 #
 #----PATH---------------------------------------------------------------------
 dd4hep_add_path    PATH ${THIS}/bin;