130 lines
5.6 KiB
Diff
130 lines
5.6 KiB
Diff
|
diff --git a/cmake/Modules/GrSwig.cmake b/cmake/Modules/GrSwig.cmake
|
||
|
index 569667b..f175cc5 100644
|
||
|
--- a/cmake/Modules/GrSwig.cmake
|
||
|
+++ b/cmake/Modules/GrSwig.cmake
|
||
|
@@ -114,7 +114,7 @@ macro(GR_SWIG_MAKE name)
|
||
|
endif()
|
||
|
|
||
|
#append additional include directories
|
||
|
- find_package(PythonLibs 2)
|
||
|
+ find_package(PythonLibs 3)
|
||
|
list(APPEND GR_SWIG_INCLUDE_DIRS ${PYTHON_INCLUDE_PATH}) #deprecated name (now dirs)
|
||
|
list(APPEND GR_SWIG_INCLUDE_DIRS ${PYTHON_INCLUDE_DIRS})
|
||
|
list(APPEND GR_SWIG_INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR})
|
||
|
diff --git a/op25/gr-op25/CMakeLists.txt b/op25/gr-op25/CMakeLists.txt
|
||
|
index 938bd67..110b99c 100644
|
||
|
--- a/op25/gr-op25/CMakeLists.txt
|
||
|
+++ b/op25/gr-op25/CMakeLists.txt
|
||
|
@@ -93,11 +93,12 @@ find_package(CppUnit)
|
||
|
# set(GR_REQUIRED_COMPONENTS RUNTIME BLOCKS FILTER ...)
|
||
|
# find_package(Gnuradio "version")
|
||
|
set(GR_REQUIRED_COMPONENTS RUNTIME BLOCKS FILTER PMT)
|
||
|
-find_package(Gnuradio)
|
||
|
-
|
||
|
-if(NOT GNURADIO_RUNTIME_FOUND)
|
||
|
- message(FATAL_ERROR "GnuRadio Runtime required to compile op25")
|
||
|
+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")
|
||
|
endif()
|
||
|
diff --git a/op25/gr-op25/lib/CMakeLists.txt b/op25/gr-op25/lib/CMakeLists.txt
|
||
|
index 1befdd9..609fa84 100644
|
||
|
--- a/op25/gr-op25/lib/CMakeLists.txt
|
||
|
+++ b/op25/gr-op25/lib/CMakeLists.txt
|
||
|
@@ -63,7 +63,7 @@ list(APPEND op25_sources
|
||
|
)
|
||
|
|
||
|
add_library(gnuradio-op25 SHARED ${op25_sources})
|
||
|
-target_link_libraries(gnuradio-op25 ${Boost_LIBRARIES} ${GNURADIO_RUNTIME_LIBRARIES} itpp pcap)
|
||
|
+target_link_libraries(gnuradio-op25 ${Boost_LIBRARIES} gnuradio::gnuradio-runtime itpp pcap)
|
||
|
set_target_properties(gnuradio-op25 PROPERTIES DEFINE_SYMBOL "gnuradio_op25_EXPORTS")
|
||
|
|
||
|
########################################################################
|
||
|
diff --git a/op25/gr-op25/swig/CMakeLists.txt b/op25/gr-op25/swig/CMakeLists.txt
|
||
|
index e99226f..2530c45 100644
|
||
|
--- a/op25/gr-op25/swig/CMakeLists.txt
|
||
|
+++ b/op25/gr-op25/swig/CMakeLists.txt
|
||
|
@@ -21,7 +21,7 @@
|
||
|
# Include swig generation macros
|
||
|
########################################################################
|
||
|
find_package(SWIG)
|
||
|
-find_package(PythonLibs 2)
|
||
|
+find_package(PythonLibs 3)
|
||
|
if(NOT SWIG_FOUND OR NOT PYTHONLIBS_FOUND)
|
||
|
return()
|
||
|
endif()
|
||
|
@@ -31,9 +31,7 @@ include(GrPython)
|
||
|
########################################################################
|
||
|
# Setup swig generation
|
||
|
########################################################################
|
||
|
-foreach(incdir ${GNURADIO_RUNTIME_INCLUDE_DIRS})
|
||
|
- list(APPEND GR_SWIG_INCLUDE_DIRS ${incdir}/gnuradio/swig)
|
||
|
-endforeach(incdir)
|
||
|
+set(GR_SWIG_INCLUDE_DIRS $<TARGET_PROPERTY:gnuradio::runtime_swig,INTERFACE_INCLUDE_DIRECTORIES>)
|
||
|
|
||
|
set(GR_SWIG_LIBRARIES gnuradio-op25)
|
||
|
set(GR_SWIG_DOC_FILE ${CMAKE_CURRENT_BINARY_DIR}/op25_swig_doc.i)
|
||
|
diff --git a/op25/gr-op25_repeater/CMakeLists.txt b/op25/gr-op25_repeater/CMakeLists.txt
|
||
|
index 9962ba3..317c8c3 100644
|
||
|
--- a/op25/gr-op25_repeater/CMakeLists.txt
|
||
|
+++ b/op25/gr-op25_repeater/CMakeLists.txt
|
||
|
@@ -92,11 +92,12 @@ find_package(CppUnit)
|
||
|
#
|
||
|
set(GR_REQUIRED_COMPONENTS RUNTIME BLOCKS FILTER PMT)
|
||
|
# find_package(Gnuradio "version")
|
||
|
-find_package(Gnuradio)
|
||
|
-
|
||
|
-if(NOT GNURADIO_RUNTIME_FOUND)
|
||
|
- message(FATAL_ERROR "GnuRadio Runtime required to compile op25_repeater")
|
||
|
+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()
|
||
|
diff --git a/op25/gr-op25_repeater/lib/CMakeLists.txt b/op25/gr-op25_repeater/lib/CMakeLists.txt
|
||
|
index 983b5b5..a18da4c 100644
|
||
|
--- a/op25/gr-op25_repeater/lib/CMakeLists.txt
|
||
|
+++ b/op25/gr-op25_repeater/lib/CMakeLists.txt
|
||
|
@@ -67,7 +67,7 @@ else(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
|
||
|
find_library(GR_FILTER_LIBRARY libgnuradio-filter.so )
|
||
|
endif(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
|
||
|
set(GR_FILTER_LIBRARIES ${GR_FILTER_LIBRARY})
|
||
|
-target_link_libraries(gnuradio-op25_repeater ${Boost_LIBRARIES} ${GNURADIO_RUNTIME_LIBRARIES} ${GR_FILTER_LIBRARIES} imbe_vocoder)
|
||
|
+target_link_libraries(gnuradio-op25_repeater ${Boost_LIBRARIES} gnuradio::gnuradio-runtime ${GR_FILTER_LIBRARIES} imbe_vocoder)
|
||
|
set_target_properties(gnuradio-op25_repeater PROPERTIES DEFINE_SYMBOL "gnuradio_op25_repeater_EXPORTS")
|
||
|
|
||
|
########################################################################
|
||
|
diff --git a/op25/gr-op25_repeater/swig/CMakeLists.txt b/op25/gr-op25_repeater/swig/CMakeLists.txt
|
||
|
index 1d88bbd..72d7335 100644
|
||
|
--- a/op25/gr-op25_repeater/swig/CMakeLists.txt
|
||
|
+++ b/op25/gr-op25_repeater/swig/CMakeLists.txt
|
||
|
@@ -21,7 +21,7 @@
|
||
|
# Include swig generation macros
|
||
|
########################################################################
|
||
|
find_package(SWIG)
|
||
|
-find_package(PythonLibs 2)
|
||
|
+find_package(PythonLibs 3)
|
||
|
if(NOT SWIG_FOUND OR NOT PYTHONLIBS_FOUND)
|
||
|
return()
|
||
|
endif()
|
||
|
@@ -31,9 +31,7 @@ include(GrPython)
|
||
|
########################################################################
|
||
|
# Setup swig generation
|
||
|
########################################################################
|
||
|
-foreach(incdir ${GNURADIO_RUNTIME_INCLUDE_DIRS})
|
||
|
- list(APPEND GR_SWIG_INCLUDE_DIRS ${incdir}/gnuradio/swig)
|
||
|
-endforeach(incdir)
|
||
|
+set(GR_SWIG_INCLUDE_DIRS $<TARGET_PROPERTY:gnuradio::runtime_swig,INTERFACE_INCLUDE_DIRECTORIES>)
|
||
|
|
||
|
set(GR_SWIG_LIBRARIES gnuradio-op25_repeater)
|
||
|
set(GR_SWIG_DOC_FILE ${CMAKE_CURRENT_BINARY_DIR}/op25_repeater_swig_doc.i)
|