summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gr-utils/python/modtool/gr-newmod/CMakeLists.txt7
-rw-r--r--gr-utils/python/modtool/gr-newmod/cmake/Modules/howtoConfig.cmake30
-rw-r--r--gr-utils/python/modtool/modtool_add.py1
-rw-r--r--gr-utils/python/modtool/modtool_base.py1
4 files changed, 39 insertions, 0 deletions
diff --git a/gr-utils/python/modtool/gr-newmod/CMakeLists.txt b/gr-utils/python/modtool/gr-newmod/CMakeLists.txt
index 7ff80ff7ac..2dac3461a8 100644
--- a/gr-utils/python/modtool/gr-newmod/CMakeLists.txt
+++ b/gr-utils/python/modtool/gr-newmod/CMakeLists.txt
@@ -146,3 +146,10 @@ add_subdirectory(python)
add_subdirectory(grc)
add_subdirectory(apps)
add_subdirectory(docs)
+
+########################################################################
+# Install cmake search helper for this library
+########################################################################
+install(FILES cmake/Modules/howtoConfig.cmake
+ DESTINATION lib/cmake/howto
+)
diff --git a/gr-utils/python/modtool/gr-newmod/cmake/Modules/howtoConfig.cmake b/gr-utils/python/modtool/gr-newmod/cmake/Modules/howtoConfig.cmake
new file mode 100644
index 0000000000..329a007608
--- /dev/null
+++ b/gr-utils/python/modtool/gr-newmod/cmake/Modules/howtoConfig.cmake
@@ -0,0 +1,30 @@
+INCLUDE(FindPkgConfig)
+PKG_CHECK_MODULES(PC_HOWTO howto)
+
+FIND_PATH(
+ HOWTO_INCLUDE_DIRS
+ NAMES howto/api.h
+ HINTS $ENV{HOWTO_DIR}/include
+ ${PC_HOWTO_INCLUDEDIR}
+ PATHS ${CMAKE_INSTALL_PREEFIX}/include
+ /usr/local/include
+ /usr/include
+)
+
+FIND_LIBRARY(
+ HOWTO_LIBRARIES
+ NAMES gnuradio-howto
+ HINTS $ENV{HOWTO_DIR}/lib
+ ${PC_HOWTO_LIBDIR}
+ PATHS ${CMAKE_INSTALL_PREFIX}/lib
+ ${CMAKE_INSTALL_PREFIX}/lib64
+ /usr/local/lib
+ /usr/local/lib64
+ /usr/lib
+ /usr/lib64
+)
+
+INCLUDE(FindPackageHandleStandardArgs)
+FIND_PACKAGE_HANDLE_STANDARD_ARGS(HOWTO DEFAULT_MSG HOWTO_LIBRARIES HOWTO_INCLUDE_DIRS)
+MARK_AS_ADVANCED(HOWTO_LIBRARIES HOWTO_INCLUDE_DIRS)
+
diff --git a/gr-utils/python/modtool/modtool_add.py b/gr-utils/python/modtool/modtool_add.py
index 81103e460d..6aae43b153 100644
--- a/gr-utils/python/modtool/modtool_add.py
+++ b/gr-utils/python/modtool/modtool_add.py
@@ -193,6 +193,7 @@ class ModToolAdd(ModTool):
Cheetah.Template.Template(
Templates['qa_cmakeentry36'],
searchList={'basename': os.path.splitext(fname_qa_cc)[0],
+ 'upperbasename': os.path.splitext(fname_qa_cc)[0].upper(),
'filename': fname_qa_cc,
'modname': self._info['modname']
}
diff --git a/gr-utils/python/modtool/modtool_base.py b/gr-utils/python/modtool/modtool_base.py
index 081c10aaf9..92649a8589 100644
--- a/gr-utils/python/modtool/modtool_base.py
+++ b/gr-utils/python/modtool/modtool_base.py
@@ -117,6 +117,7 @@ class ModTool(object):
self._info['includedir'] = 'include'
self._file['cminclude'] = os.path.join(self._info['includedir'], 'CMakeLists.txt')
self._file['cmswig'] = os.path.join('swig', 'CMakeLists.txt')
+ self._file['cmfind'] = os.path.join('cmake', 'Modules', 'howtoConfig.cmake')
def _check_directory(self, directory):
""" Guesses if dir is a valid GNU Radio module directory by looking for