diff options
author | Tom Rondeau <trondeau@trondeau.com> | 2015-04-15 13:42:15 -0700 |
---|---|---|
committer | Johnathan Corgan <johnathan@corganlabs.com> | 2015-04-15 13:42:33 -0700 |
commit | 0ab6607ffb0d45816a69c7069a1da90cc94bf047 (patch) | |
tree | 825e9d479cf18629fe451f179af41ead9b194652 /gnuradio-runtime/lib/controlport | |
parent | c7b7e577c6a196c79c99582ae664fbf25e022ab4 (diff) |
cmake: fix case for ctrlport when no backends installed
Diffstat (limited to 'gnuradio-runtime/lib/controlport')
-rw-r--r-- | gnuradio-runtime/lib/controlport/CMakeLists.txt | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/gnuradio-runtime/lib/controlport/CMakeLists.txt b/gnuradio-runtime/lib/controlport/CMakeLists.txt index 4998aebec6..f0d2618c01 100644 --- a/gnuradio-runtime/lib/controlport/CMakeLists.txt +++ b/gnuradio-runtime/lib/controlport/CMakeLists.txt @@ -19,6 +19,9 @@ if(ENABLE_GR_CTRLPORT) +# Keep track of the number of backends ControlPort supports +SET(CTRLPORT_BACKENDS 0) + # Add definition so we can compile in ControlPort to the blocks. add_definitions(-DGR_CTRLPORT) @@ -41,6 +44,8 @@ FIND_PACKAGE(Thrift) if(THRIFT_FOUND) +MATH(EXPR CTRLPORT_BACKENDS "${CTRLPORT_BACKENDS} + 1") + # Indicate thrift as an installed backend in the cmake summary. message(STATUS "Found and enabling Thrift backend to ControlPort") GR_APPEND_SUBCOMPONENT("thrift") @@ -90,4 +95,10 @@ endif(ENABLE_CTRLPORT_THRIFT) include_directories(${CMAKE_CURRENT_BINARY_DIR}) +# Save the number of backends for testing against later +set( + CTRLPORT_BACKENDS ${CTRLPORT_BACKENDS} + CACHE INTERNAL "Number of ControlPort backends available" +) + endif(ENABLE_GR_CTRLPORT) |