diff options
author | Tom Rondeau <tom@trondeau.com> | 2013-11-11 14:33:17 -0500 |
---|---|---|
committer | Tom Rondeau <tom@trondeau.com> | 2013-11-13 10:23:04 -0500 |
commit | 42521b0c7f6bf7406807e09ddaddbd1e13ba87de (patch) | |
tree | 9e90f802b51158c7153b050917636d27b20715c1 | |
parent | 2b983d9c9bbef5efba0150c0589ebc6df56b8fe6 (diff) |
modtool: start defaulting to GnuradioConfig when searching for GR.
This also defaults to using GNURADIO_ALL_INCLUDE_DIRS and GNURADIO_ALL_LIBRARIES to make it even easier to link against GR components.
-rw-r--r-- | cmake/Modules/GnuradioConfig.cmake | 4 | ||||
-rw-r--r-- | gr-utils/python/modtool/gr-newmod/CMakeLists.txt | 19 | ||||
-rw-r--r-- | gr-utils/python/modtool/gr-newmod/lib/CMakeLists.txt | 2 |
3 files changed, 12 insertions, 13 deletions
diff --git a/cmake/Modules/GnuradioConfig.cmake b/cmake/Modules/GnuradioConfig.cmake index c162d096ec..91d202b5c2 100644 --- a/cmake/Modules/GnuradioConfig.cmake +++ b/cmake/Modules/GnuradioConfig.cmake @@ -25,6 +25,10 @@ if(NOT GR_REQUIRED_COMPONENTS) set(GR_REQUIRED_COMPONENTS RUNTIME ANALOG BLOCKS DIGITAL FFT FILTER PMT) endif() +# Allows us to use all .cmake files in this directory +list(INSERT CMAKE_MODULE_PATH 0 ${CMAKE_CURRENT_LIST_DIR}) + +# Easily access all libraries and includes of GNU Radio set(GNURADIO_ALL_LIBRARIES "") set(GNURADIO_ALL_INCLUDE_DIRS "") diff --git a/gr-utils/python/modtool/gr-newmod/CMakeLists.txt b/gr-utils/python/modtool/gr-newmod/CMakeLists.txt index 2dac3461a8..1d2e37b6a6 100644 --- a/gr-utils/python/modtool/gr-newmod/CMakeLists.txt +++ b/gr-utils/python/modtool/gr-newmod/CMakeLists.txt @@ -83,20 +83,15 @@ set(GRC_BLOCKS_DIR ${GR_PKG_DATA_DIR}/grc/blocks) ######################################################################## # Find gnuradio build dependencies ######################################################################## -find_package(GnuradioRuntime) find_package(CppUnit) -# To run a more advanced search for GNU Radio and it's components and -# versions, use the following. Add any components required to the list -# of GR_REQUIRED_COMPONENTS (in all caps) and change "version" to the -# minimum API compatible version required. -# -# set(GR_REQUIRED_COMPONENTS RUNTIME BLOCKS FILTER ...) -# find_package(Gnuradio "version") +# Search for GNU Radio and its components and versions. Add any +# components required to the list of GR_REQUIRED_COMPONENTS (in all +# caps such as FILTER or FFT) and change the version to the minimum +# API compatible version required. +set(GR_REQUIRED_COMPONENTS RUNTIME) +find_package(Gnuradio "3.7.2" REQUIRED) -if(NOT GNURADIO_RUNTIME_FOUND) - message(FATAL_ERROR "GnuRadio Runtime required to compile howto") -endif() if(NOT CPPUNIT_FOUND) message(FATAL_ERROR "CppUnit required to compile howto") endif() @@ -111,7 +106,7 @@ include_directories( ${CMAKE_BINARY_DIR}/include ${Boost_INCLUDE_DIRS} ${CPPUNIT_INCLUDE_DIRS} - ${GNURADIO_RUNTIME_INCLUDE_DIRS} + ${GNURADIO_ALL_INCLUDE_DIRS} ) link_directories( diff --git a/gr-utils/python/modtool/gr-newmod/lib/CMakeLists.txt b/gr-utils/python/modtool/gr-newmod/lib/CMakeLists.txt index 312594149c..de53723de2 100644 --- a/gr-utils/python/modtool/gr-newmod/lib/CMakeLists.txt +++ b/gr-utils/python/modtool/gr-newmod/lib/CMakeLists.txt @@ -29,7 +29,7 @@ list(APPEND howto_sources ) add_library(gnuradio-howto SHARED ${howto_sources}) -target_link_libraries(gnuradio-howto ${Boost_LIBRARIES} ${GNURADIO_RUNTIME_LIBRARIES}) +target_link_libraries(gnuradio-howto ${Boost_LIBRARIES} ${GNURADIO_ALL_LIBRARIES}) set_target_properties(gnuradio-howto PROPERTIES DEFINE_SYMBOL "gnuradio_howto_EXPORTS") ######################################################################## |