Skip to content

Commit

Permalink
Update cmake to handle gr3.8 and gr3.9
Browse files Browse the repository at this point in the history
Due to the existence of the ubuntu ppa's, development builds of gnuradio are becoming more common with the version 3.9. This updates cmake to handle 3.8 and 3.9 with some minor changes for windows includes. Fixes #72

Signed-off-by: Travis F. Collins <[email protected]>
  • Loading branch information
tfcollins committed Feb 24, 2020
1 parent 8456464 commit 12f9040
Showing 1 changed file with 11 additions and 8 deletions.
19 changes: 11 additions & 8 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,14 @@ ENDIF()
########################################################################
# Find packages
########################################################################
find_package(Gnuradio "3.8" REQUIRED)
set(GR_COMPONENTS blocks analog volk pmt filter fft)
find_package(Gnuradio "3.8" COMPONENTS ${GR_COMPONENTS})
if(NOT Gnuradio_FOUND)
find_package(Gnuradio "3.9" COMPONENTS ${GR_COMPONENTS})
if(NOT Gnuradio_FOUND)
message(FATAL_ERROR "Unable to find GNURadio")
endif(NOT Gnuradio_FOUND)
endif(NOT Gnuradio_FOUND)
include(GrVersion)
include(GrPlatform) #define LIB_SUFFIX

Expand All @@ -105,13 +112,9 @@ set(GRC_BLOCKS_DIR ${GR_PKG_DATA_DIR}/grc/blocks)
########################################################################
# Find gnuradio build dependencies
########################################################################

# 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.
find_package(Gnuradio COMPONENTS blocks analog volk pmt filter fft)
find_package(Gnuradio PATHS "c:/Program Files/gnuradio/lib/cmake/gnuradio" REQUIRED)
if(WIN32)
find_package(Gnuradio PATHS "c:/Program Files/gnuradio/lib/cmake/gnuradio" REQUIRED)
endif()

find_library(IIO_LIBRARIES iio)
find_path(IIO_INCLUDE_DIRS iio.h)
Expand Down

0 comments on commit 12f9040

Please sign in to comment.