aboutsummaryrefslogtreecommitdiffstats
path: root/op25/gr-op25_repeater/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'op25/gr-op25_repeater/CMakeLists.txt')
-rw-r--r--op25/gr-op25_repeater/CMakeLists.txt50
1 files changed, 25 insertions, 25 deletions
diff --git a/op25/gr-op25_repeater/CMakeLists.txt b/op25/gr-op25_repeater/CMakeLists.txt
index f998705..dc1d8e7 100644
--- a/op25/gr-op25_repeater/CMakeLists.txt
+++ b/op25/gr-op25_repeater/CMakeLists.txt
@@ -64,6 +64,31 @@ if(NOT Boost_FOUND)
endif()
########################################################################
+# Find gnuradio build dependencies
+########################################################################
+find_package(CppUnit)
+
+set(ENABLE_PYTHON "TRUE" CACHE BOOL "enable python")
+cmake_policy(SET CMP0012 NEW)
+
+# 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 PMT)
+# find_package(Gnuradio "version")
+set(MIN_GR_VERSION "3.8.0")
+find_package(Gnuradio REQUIRED)
+if("${Gnuradio_VERSION}" VERSION_LESS MIN_GR_VERSION)
+ MESSAGE(FATAL_ERROR "GnuRadio version required: >=\"" ${MIN_GR_VERSION} "\" found: \"" ${Gnuradio_VERSION} "\"")
+endif()
+
+if(NOT CPPUNIT_FOUND)
+ message(FATAL_ERROR "CppUnit required to compile op25_repeater")
+endif()
+
+########################################################################
# Install directories
########################################################################
include(GrPlatform) #define LIB_SUFFIX
@@ -81,31 +106,6 @@ set(GR_PKG_LIBEXEC_DIR ${GR_LIBEXEC_DIR}/${CMAKE_PROJECT_NAME})
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")
-if(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
- set(GR_REQUIRED_COMPONENTS RUNTIME BLOCKS FILTER PMT)
- find_package(Gnuradio)
-endif(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
-
-if(NOT GNURADIO_RUNTIME_FOUND)
- message(FATAL_ERROR "GnuRadio Runtime required to compile op25_repeater")
-endif()
-if(NOT CPPUNIT_FOUND)
- message(FATAL_ERROR "CppUnit required to compile op25_repeater")
-endif()
-
-########################################################################
# Setup the include and linker paths
########################################################################
include_directories(