From f338c66808d8b56f40c5c4dbb34c4d3c13ff8d24 Mon Sep 17 00:00:00 2001
From: Jiri Pinkava <j-pi@seznam.cz>
Date: Sat, 20 Jul 2013 21:11:51 +0200
Subject: modtool: fix detection of GNU Radio module directory

---
 gr-utils/python/modtool/modtool_base.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

(limited to 'gr-utils/python/modtool/modtool_base.py')

diff --git a/gr-utils/python/modtool/modtool_base.py b/gr-utils/python/modtool/modtool_base.py
index a03334bedc..081c10aaf9 100644
--- a/gr-utils/python/modtool/modtool_base.py
+++ b/gr-utils/python/modtool/modtool_base.py
@@ -131,7 +131,8 @@ class ModTool(object):
             return False
         for f in files:
             if os.path.isfile(f) and f == 'CMakeLists.txt':
-                if re.search('find_package\(GnuradioRuntime\)', open(f).read()) is not None:
+                if re.search('find_package\(GnuradioRuntime\)', open(f).read()) is not None or \
+                                re.search('find_package\(Gnuradio(\s+[0-9".]+)?\)', open(f).read()) is not None:
                     self._info['version'] = '36' # Might be 37, check that later
                     has_makefile = True
                 elif re.search('GR_REGISTER_COMPONENT', open(f).read()) is not None:
-- 
cgit v1.2.3