diff options
author | Tim O'Shea <tim.oshea753@gmail.com> | 2013-10-09 20:11:49 -0400 |
---|---|---|
committer | Johnathan Corgan <johnathan@corganlabs.com> | 2013-10-12 09:12:36 -0700 |
commit | 2104810f45d89b65ba91b79664855b365959909a (patch) | |
tree | 24a3f770bd6a13a65dab8f1a09f8224ab4d1447c /gr-utils/python/modtool/gr-newmod | |
parent | e83d63263e95471f0fb48cdfbbc794b564e72703 (diff) |
gr_modtool: install a howtoConfig.cmake when creating new out of tree modules, this will allow other cmake modules to be able to easily find and link against it in a clean way
Diffstat (limited to 'gr-utils/python/modtool/gr-newmod')
-rw-r--r-- | gr-utils/python/modtool/gr-newmod/CMakeLists.txt | 7 | ||||
-rw-r--r-- | gr-utils/python/modtool/gr-newmod/cmake/Modules/howtoConfig.cmake | 30 |
2 files changed, 37 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) + |